From 115d82bd9f49c5bb8582a738bfd3cf8af38e15a8 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 31 Mar 2020 09:20:15 -0700 Subject: [PATCH] feat(v1): add v1 client (#131) --- google-cloud-datacatalog-bom/pom.xml | 12 +- google-cloud-datacatalog/pom.xml | 9 + .../datacatalog/v1/DataCatalogClient.java | 3614 +++++++++++++++ .../datacatalog/v1/DataCatalogSettings.java | 475 ++ .../cloud/datacatalog/v1/package-info.java | 43 + .../datacatalog/v1/stub/DataCatalogStub.java | 209 + .../v1/stub/DataCatalogStubSettings.java | 1193 +++++ .../stub/GrpcDataCatalogCallableFactory.java | 115 + .../v1/stub/GrpcDataCatalogStub.java | 1008 +++++ .../datacatalog/v1/DataCatalogClientTest.java | 1671 +++++++ .../cloud/datacatalog/v1/MockDataCatalog.java | 57 + .../datacatalog/v1/MockDataCatalogImpl.java | 459 ++ grpc-google-cloud-datacatalog-v1/pom.xml | 60 + .../cloud/datacatalog/v1/DataCatalogGrpc.java | 3755 ++++++++++++++++ pom.xml | 12 + proto-google-cloud-datacatalog-v1/pom.xml | 37 + .../v1/BigQueryDateShardedSpec.java | 946 ++++ .../v1/BigQueryDateShardedSpecOrBuilder.java | 100 + .../datacatalog/v1/BigQueryTableSpec.java | 1315 ++++++ .../v1/BigQueryTableSpecOrBuilder.java | 132 + .../cloud/datacatalog/v1/ColumnSchema.java | 1715 +++++++ .../datacatalog/v1/ColumnSchemaOrBuilder.java | 191 + .../google/cloud/datacatalog/v1/Common.java | 52 + .../v1/CreateEntryGroupRequest.java | 1138 +++++ .../v1/CreateEntryGroupRequestOrBuilder.java | 124 + .../datacatalog/v1/CreateEntryRequest.java | 1128 +++++ .../v1/CreateEntryRequestOrBuilder.java | 123 + .../datacatalog/v1/CreateTagRequest.java | 955 ++++ .../v1/CreateTagRequestOrBuilder.java | 100 + .../v1/CreateTagTemplateFieldRequest.java | 1188 +++++ ...reateTagTemplateFieldRequestOrBuilder.java | 136 + .../v1/CreateTagTemplateRequest.java | 1155 +++++ .../v1/CreateTagTemplateRequestOrBuilder.java | 128 + .../cloud/datacatalog/v1/Datacatalog.java | 774 ++++ .../v1/DeleteEntryGroupRequest.java | 746 ++++ .../v1/DeleteEntryGroupRequestOrBuilder.java | 69 + .../datacatalog/v1/DeleteEntryRequest.java | 657 +++ .../v1/DeleteEntryRequestOrBuilder.java | 56 + .../datacatalog/v1/DeleteTagRequest.java | 656 +++ .../v1/DeleteTagRequestOrBuilder.java | 56 + .../v1/DeleteTagTemplateFieldRequest.java | 758 ++++ ...eleteTagTemplateFieldRequestOrBuilder.java | 71 + .../v1/DeleteTagTemplateRequest.java | 754 ++++ .../v1/DeleteTagTemplateRequestOrBuilder.java | 71 + .../google/cloud/datacatalog/v1/Entry.java | 3922 +++++++++++++++++ .../cloud/datacatalog/v1/EntryGroup.java | 1337 ++++++ .../cloud/datacatalog/v1/EntryGroupName.java | 211 + .../datacatalog/v1/EntryGroupOrBuilder.java | 153 + .../cloud/datacatalog/v1/EntryName.java | 242 + .../cloud/datacatalog/v1/EntryOrBuilder.java | 491 +++ .../cloud/datacatalog/v1/EntryType.java | 226 + .../cloud/datacatalog/v1/FieldType.java | 3009 +++++++++++++ .../datacatalog/v1/FieldTypeOrBuilder.java | 87 + .../cloud/datacatalog/v1/GcsFileSpec.java | 1019 +++++ .../datacatalog/v1/GcsFileSpecOrBuilder.java | 104 + .../cloud/datacatalog/v1/GcsFilesetSpec.java | 1574 +++++++ .../v1/GcsFilesetSpecOrBuilder.java | 227 + .../v1/GcsFilesetSpecOuterClass.java | 95 + .../datacatalog/v1/GetEntryGroupRequest.java | 922 ++++ .../v1/GetEntryGroupRequestOrBuilder.java | 91 + .../cloud/datacatalog/v1/GetEntryRequest.java | 656 +++ .../v1/GetEntryRequestOrBuilder.java | 56 + .../datacatalog/v1/GetTagTemplateRequest.java | 658 +++ .../v1/GetTagTemplateRequestOrBuilder.java | 56 + .../datacatalog/v1/IntegratedSystem.java | 173 + .../datacatalog/v1/ListEntriesRequest.java | 1241 ++++++ .../v1/ListEntriesRequestOrBuilder.java | 143 + .../datacatalog/v1/ListEntriesResponse.java | 1129 +++++ .../v1/ListEntriesResponseOrBuilder.java | 104 + .../v1/ListEntryGroupsRequest.java | 941 ++++ .../v1/ListEntryGroupsRequestOrBuilder.java | 99 + .../v1/ListEntryGroupsResponse.java | 1134 +++++ .../v1/ListEntryGroupsResponseOrBuilder.java | 104 + .../cloud/datacatalog/v1/ListTagsRequest.java | 956 ++++ .../v1/ListTagsRequestOrBuilder.java | 104 + .../datacatalog/v1/ListTagsResponse.java | 1126 +++++ .../v1/ListTagsResponseOrBuilder.java | 103 + .../cloud/datacatalog/v1/LocationName.java | 182 + .../datacatalog/v1/LookupEntryRequest.java | 1041 +++++ .../v1/LookupEntryRequestOrBuilder.java | 105 + .../v1/RenameTagTemplateFieldRequest.java | 839 ++++ ...enameTagTemplateFieldRequestOrBuilder.java | 81 + .../google/cloud/datacatalog/v1/Schema.java | 1011 +++++ .../cloud/datacatalog/v1/SchemaOrBuilder.java | 92 + .../datacatalog/v1/SchemaOuterClass.java | 91 + .../google/cloud/datacatalog/v1/Search.java | 95 + .../datacatalog/v1/SearchCatalogRequest.java | 2831 ++++++++++++ .../v1/SearchCatalogRequestOrBuilder.java | 198 + .../datacatalog/v1/SearchCatalogResponse.java | 1135 +++++ .../v1/SearchCatalogResponseOrBuilder.java | 102 + .../datacatalog/v1/SearchCatalogResult.java | 1689 +++++++ .../v1/SearchCatalogResultOrBuilder.java | 205 + .../datacatalog/v1/SearchResultType.java | 194 + .../datacatalog/v1/SystemTimestamps.java | 1295 ++++++ .../v1/SystemTimestampsOrBuilder.java | 136 + .../cloud/datacatalog/v1/TableSourceType.java | 174 + .../cloud/datacatalog/v1/TableSpec.java | 674 +++ .../datacatalog/v1/TableSpecOrBuilder.java | 62 + .../datacatalog/v1/TableSpecOuterClass.java | 127 + .../com/google/cloud/datacatalog/v1/Tag.java | 1708 +++++++ .../google/cloud/datacatalog/v1/TagField.java | 2489 +++++++++++ .../datacatalog/v1/TagFieldOrBuilder.java | 193 + .../google/cloud/datacatalog/v1/TagName.java | 277 ++ .../cloud/datacatalog/v1/TagOrBuilder.java | 220 + .../cloud/datacatalog/v1/TagTemplate.java | 1272 ++++++ .../datacatalog/v1/TagTemplateField.java | 1315 ++++++ .../datacatalog/v1/TagTemplateFieldName.java | 243 + .../v1/TagTemplateFieldOrBuilder.java | 151 + .../cloud/datacatalog/v1/TagTemplateName.java | 215 + .../datacatalog/v1/TagTemplateOrBuilder.java | 176 + .../com/google/cloud/datacatalog/v1/Tags.java | 240 + .../cloud/datacatalog/v1/Timestamps.java | 80 + .../v1/UpdateEntryGroupRequest.java | 1039 +++++ .../v1/UpdateEntryGroupRequestOrBuilder.java | 104 + .../datacatalog/v1/UpdateEntryRequest.java | 1223 +++++ .../v1/UpdateEntryRequestOrBuilder.java | 152 + .../datacatalog/v1/UpdateTagRequest.java | 1016 +++++ .../v1/UpdateTagRequestOrBuilder.java | 101 + .../v1/UpdateTagTemplateFieldRequest.java | 1363 ++++++ ...pdateTagTemplateFieldRequestOrBuilder.java | 165 + .../v1/UpdateTagTemplateRequest.java | 1063 +++++ .../v1/UpdateTagTemplateRequestOrBuilder.java | 110 + .../google/cloud/datacatalog/v1/ViewSpec.java | 631 +++ .../datacatalog/v1/ViewSpecOrBuilder.java | 50 + .../google/cloud/datacatalog/v1/common.proto | 35 + .../cloud/datacatalog/v1/datacatalog.proto | 1180 +++++ .../datacatalog/v1/gcs_fileset_spec.proto | 72 + .../google/cloud/datacatalog/v1/schema.proto | 52 + .../google/cloud/datacatalog/v1/search.proto | 81 + .../cloud/datacatalog/v1/table_spec.proto | 98 + .../google/cloud/datacatalog/v1/tags.proto | 223 + .../cloud/datacatalog/v1/timestamps.proto | 38 + synth.metadata | 28 +- synth.py | 2 +- versions.txt | 2 + 135 files changed, 80274 insertions(+), 8 deletions(-) create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogCallableFactory.java create mode 100644 google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java create mode 100644 google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java create mode 100644 google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalog.java create mode 100644 google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java create mode 100644 grpc-google-cloud-datacatalog-v1/pom.xml create mode 100644 grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java create mode 100644 proto-google-cloud-datacatalog-v1/pom.xml create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldTypeOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOuterClass.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponse.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponseOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponse.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponseOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponse.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponseOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LocationName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchResultType.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestamps.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestampsOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateName.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Timestamps.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpec.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpecOrBuilder.java create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto create mode 100644 proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto diff --git a/google-cloud-datacatalog-bom/pom.xml b/google-cloud-datacatalog-bom/pom.xml index 99569324..811c33e8 100644 --- a/google-cloud-datacatalog-bom/pom.xml +++ b/google-cloud-datacatalog-bom/pom.xml @@ -11,7 +11,7 @@ 0.4.0 - Google Cloud datacatalog BOM + Google Cloud Data Catalog BOM https://github.com/googleapis/java-datacatalog BOM for Google Cloud Data Catalog @@ -61,6 +61,11 @@ + + com.google.api.grpc + proto-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 @@ -71,6 +76,11 @@ google-cloud-datacatalog 0.33.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 diff --git a/google-cloud-datacatalog/pom.xml b/google-cloud-datacatalog/pom.xml index cb93d59c..3707c63b 100644 --- a/google-cloud-datacatalog/pom.xml +++ b/google-cloud-datacatalog/pom.xml @@ -46,6 +46,10 @@ proto-google-iam-v1 + + com.google.api.grpc + proto-google-cloud-datacatalog-v1 + com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 @@ -79,6 +83,11 @@ test + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1 + test + com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java new file mode 100644 index 00000000..ea051393 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java @@ -0,0 +1,3614 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +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.datacatalog.v1.stub.DataCatalogStub; +import com.google.cloud.datacatalog.v1.stub.DataCatalogStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 SERVICE +/** + * Service Description: Data Catalog API service allows clients to discover, understand, and manage + * their data. + * + *

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: + * + *

+ * 
+ * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   String entryGroupId = "";
+ *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the dataCatalogClient 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 DataCatalogSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * DataCatalogSettings dataCatalogSettings =
+ *     DataCatalogSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataCatalogClient dataCatalogClient =
+ *     DataCatalogClient.create(dataCatalogSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * DataCatalogSettings dataCatalogSettings =
+ *     DataCatalogSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataCatalogClient dataCatalogClient =
+ *     DataCatalogClient.create(dataCatalogSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogClient implements BackgroundResource { + private final DataCatalogSettings settings; + private final DataCatalogStub stub; + + /** Constructs an instance of DataCatalogClient with default settings. */ + public static final DataCatalogClient create() throws IOException { + return create(DataCatalogSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataCatalogClient, 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 DataCatalogClient create(DataCatalogSettings settings) throws IOException { + return new DataCatalogClient(settings); + } + + /** + * Constructs an instance of DataCatalogClient, using the given stub for making calls. This is for + * advanced usage - prefer to use DataCatalogSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataCatalogClient create(DataCatalogStub stub) { + return new DataCatalogClient(stub); + } + + /** + * Constructs an instance of DataCatalogClient, 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 DataCatalogClient(DataCatalogSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataCatalogStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataCatalogClient(DataCatalogStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DataCatalogSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataCatalogStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches Data Catalog for multiple resources like entries, tags that match a query. + * + *

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not + * return the complete resource, only the resource identifier and high level fields. Clients can + * subsequentally call `Get` methods. + * + *

Note that Data Catalog search queries do not guarantee full recall. Query results that match + * your query may not be returned, even in subsequent result pages. Also note that results + * returned (and not returned) can vary across repeated search queries. + * + *

See [Data Catalog Search Syntax](/data-catalog/docs/how-to/search-reference) for more + * information. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
+   *   String query = "";
+   *   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(scope, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param scope Required. The scope of this search request. A `scope` that has empty + * `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is + * considered invalid. Data Catalog will return an error in such a case. + * @param query Required. The query string in search query syntax. The query must be non-empty. + *

Query strings can be simple as "x" or more qualified as: + *

* name:x * column:x * description:y + *

Note: Query tokens need to have a minimum of 3 characters for substring matching to work + * correctly. See [Data Catalog Search Syntax](/data-catalog/docs/how-to/search-reference) for + * more information. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchCatalogPagedResponse searchCatalog( + SearchCatalogRequest.Scope scope, String query) { + SearchCatalogRequest request = + SearchCatalogRequest.newBuilder().setScope(scope).setQuery(query).build(); + return searchCatalog(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches Data Catalog for multiple resources like entries, tags that match a query. + * + *

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not + * return the complete resource, only the resource identifier and high level fields. Clients can + * subsequentally call `Get` methods. + * + *

Note that Data Catalog search queries do not guarantee full recall. Query results that match + * your query may not be returned, even in subsequent result pages. Also note that results + * returned (and not returned) can vary across repeated search queries. + * + *

See [Data Catalog Search Syntax](/data-catalog/docs/how-to/search-reference) for more + * information. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
+   *   String query = "";
+   *   SearchCatalogRequest request = SearchCatalogRequest.newBuilder()
+   *     .setScope(scope)
+   *     .setQuery(query)
+   *     .build();
+   *   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(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 SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest request) { + return searchCatalogPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches Data Catalog for multiple resources like entries, tags that match a query. + * + *

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not + * return the complete resource, only the resource identifier and high level fields. Clients can + * subsequentally call `Get` methods. + * + *

Note that Data Catalog search queries do not guarantee full recall. Query results that match + * your query may not be returned, even in subsequent result pages. Also note that results + * returned (and not returned) can vary across repeated search queries. + * + *

See [Data Catalog Search Syntax](/data-catalog/docs/how-to/search-reference) for more + * information. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
+   *   String query = "";
+   *   SearchCatalogRequest request = SearchCatalogRequest.newBuilder()
+   *     .setScope(scope)
+   *     .setQuery(query)
+   *     .build();
+   *   ApiFuture<SearchCatalogPagedResponse> future = dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (SearchCatalogResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + searchCatalogPagedCallable() { + return stub.searchCatalogPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches Data Catalog for multiple resources like entries, tags that match a query. + * + *

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not + * return the complete resource, only the resource identifier and high level fields. Clients can + * subsequentally call `Get` methods. + * + *

Note that Data Catalog search queries do not guarantee full recall. Query results that match + * your query may not be returned, even in subsequent result pages. Also note that results + * returned (and not returned) can vary across repeated search queries. + * + *

See [Data Catalog Search Syntax](/data-catalog/docs/how-to/search-reference) for more + * information. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
+   *   String query = "";
+   *   SearchCatalogRequest request = SearchCatalogRequest.newBuilder()
+   *     .setScope(scope)
+   *     .setQuery(query)
+   *     .build();
+   *   while (true) {
+   *     SearchCatalogResponse response = dataCatalogClient.searchCatalogCallable().call(request);
+   *     for (SearchCatalogResult element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable searchCatalogCallable() { + return stub.searchCatalogCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an EntryGroup. + * + *

An entry group contains logically related entries together with Cloud Identity and Access + * Management policies that specify the users who can create, edit, and view entries within the + * entry group. + * + *

Data Catalog automatically creates an entry group for BigQuery entries + * ("{@literal @}bigquery") and Pub/Sub topics ("{@literal @}pubsub"). Users create their own + * entry group to contain Cloud Storage fileset entries or custom type entries, and the IAM + * policies associated with those entries. Entry groups, like entries, can be searched. + * + *

A maximum of 10,000 entry groups may be created per organization across all locations. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String entryGroupId = "";
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
+   * }
+   * 
+ * + * @param parent Required. The name of the project this entry group is in. Example: + *

* projects/{project_id}/locations/{location} + *

Note that this EntryGroup and its child resources may not actually be stored in the + * location in this name. + * @param entryGroupId Required. The id of the entry group to create. The id must begin with a + * letter or underscore, contain only English letters, numbers and underscores, and be at most + * 64 characters. + * @param entryGroup The entry group to create. Defaults to an empty entry group. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup createEntryGroup( + LocationName parent, String entryGroupId, EntryGroup entryGroup) { + CreateEntryGroupRequest request = + CreateEntryGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEntryGroupId(entryGroupId) + .setEntryGroup(entryGroup) + .build(); + return createEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an EntryGroup. + * + *

An entry group contains logically related entries together with Cloud Identity and Access + * Management policies that specify the users who can create, edit, and view entries within the + * entry group. + * + *

Data Catalog automatically creates an entry group for BigQuery entries + * ("{@literal @}bigquery") and Pub/Sub topics ("{@literal @}pubsub"). Users create their own + * entry group to contain Cloud Storage fileset entries or custom type entries, and the IAM + * policies associated with those entries. Entry groups, like entries, can be searched. + * + *

A maximum of 10,000 entry groups may be created per organization across all locations. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String entryGroupId = "";
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent.toString(), entryGroupId, entryGroup);
+   * }
+   * 
+ * + * @param parent Required. The name of the project this entry group is in. Example: + *

* projects/{project_id}/locations/{location} + *

Note that this EntryGroup and its child resources may not actually be stored in the + * location in this name. + * @param entryGroupId Required. The id of the entry group to create. The id must begin with a + * letter or underscore, contain only English letters, numbers and underscores, and be at most + * 64 characters. + * @param entryGroup The entry group to create. Defaults to an empty entry group. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup createEntryGroup( + String parent, String entryGroupId, EntryGroup entryGroup) { + CreateEntryGroupRequest request = + CreateEntryGroupRequest.newBuilder() + .setParent(parent) + .setEntryGroupId(entryGroupId) + .setEntryGroup(entryGroup) + .build(); + return createEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an EntryGroup. + * + *

An entry group contains logically related entries together with Cloud Identity and Access + * Management policies that specify the users who can create, edit, and view entries within the + * entry group. + * + *

Data Catalog automatically creates an entry group for BigQuery entries + * ("{@literal @}bigquery") and Pub/Sub topics ("{@literal @}pubsub"). Users create their own + * entry group to contain Cloud Storage fileset entries or custom type entries, and the IAM + * policies associated with those entries. Entry groups, like entries, can be searched. + * + *

A maximum of 10,000 entry groups may be created per organization across all locations. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String entryGroupId = "";
+   *   CreateEntryGroupRequest request = CreateEntryGroupRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setEntryGroupId(entryGroupId)
+   *     .build();
+   *   EntryGroup response = dataCatalogClient.createEntryGroup(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 EntryGroup createEntryGroup(CreateEntryGroupRequest request) { + return createEntryGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an EntryGroup. + * + *

An entry group contains logically related entries together with Cloud Identity and Access + * Management policies that specify the users who can create, edit, and view entries within the + * entry group. + * + *

Data Catalog automatically creates an entry group for BigQuery entries + * ("{@literal @}bigquery") and Pub/Sub topics ("{@literal @}pubsub"). Users create their own + * entry group to contain Cloud Storage fileset entries or custom type entries, and the IAM + * policies associated with those entries. Entry groups, like entries, can be searched. + * + *

A maximum of 10,000 entry groups may be created per organization across all locations. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String entryGroupId = "";
+   *   CreateEntryGroupRequest request = CreateEntryGroupRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setEntryGroupId(entryGroupId)
+   *     .build();
+   *   ApiFuture<EntryGroup> future = dataCatalogClient.createEntryGroupCallable().futureCall(request);
+   *   // Do something
+   *   EntryGroup response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createEntryGroupCallable() { + return stub.createEntryGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup getEntryGroup(EntryGroupName name) { + GetEntryGroupRequest request = + GetEntryGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   EntryGroup response = dataCatalogClient.getEntryGroup(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup getEntryGroup(String name) { + GetEntryGroupRequest request = GetEntryGroupRequest.newBuilder().setName(name).build(); + return getEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   FieldMask readMask = FieldMask.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @param readMask The fields to return. If not set or empty, all fields are returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask) { + GetEntryGroupRequest request = + GetEntryGroupRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setReadMask(readMask) + .build(); + return getEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   FieldMask readMask = FieldMask.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.getEntryGroup(name.toString(), readMask);
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @param readMask The fields to return. If not set or empty, all fields are returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup getEntryGroup(String name, FieldMask readMask) { + GetEntryGroupRequest request = + GetEntryGroupRequest.newBuilder().setName(name).setReadMask(readMask).build(); + return getEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   GetEntryGroupRequest request = GetEntryGroupRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   EntryGroup response = dataCatalogClient.getEntryGroup(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 EntryGroup getEntryGroup(GetEntryGroupRequest request) { + return getEntryGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an EntryGroup. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   GetEntryGroupRequest request = GetEntryGroupRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<EntryGroup> future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
+   *   // Do something
+   *   EntryGroup response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getEntryGroupCallable() { + return stub.getEntryGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
+   * }
+   * 
+ * + * @param entryGroup Required. The updated entry group. "name" field must be set. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup updateEntryGroup(EntryGroup entryGroup) { + UpdateEntryGroupRequest request = + UpdateEntryGroupRequest.newBuilder().setEntryGroup(entryGroup).build(); + return updateEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
+   * }
+   * 
+ * + * @param entryGroup Required. The updated entry group. "name" field must be set. + * @param updateMask The fields to update on the entry group. If absent or empty, all modifiable + * fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask) { + UpdateEntryGroupRequest request = + UpdateEntryGroupRequest.newBuilder() + .setEntryGroup(entryGroup) + .setUpdateMask(updateMask) + .build(); + return updateEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder()
+   *     .setEntryGroup(entryGroup)
+   *     .build();
+   *   EntryGroup response = dataCatalogClient.updateEntryGroup(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 EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) { + return updateEntryGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by + * the `entry_group.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder()
+   *     .setEntryGroup(entryGroup)
+   *     .build();
+   *   ApiFuture<EntryGroup> future = dataCatalogClient.updateEntryGroupCallable().futureCall(request);
+   *   // Do something
+   *   EntryGroup response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateEntryGroupCallable() { + return stub.updateEntryGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   dataCatalogClient.deleteEntryGroup(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntryGroup(EntryGroupName name) { + DeleteEntryGroupRequest request = + DeleteEntryGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   dataCatalogClient.deleteEntryGroup(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entry group. For example, + * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntryGroup(String name) { + DeleteEntryGroupRequest request = DeleteEntryGroupRequest.newBuilder().setName(name).build(); + deleteEntryGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   DeleteEntryGroupRequest request = DeleteEntryGroupRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   dataCatalogClient.deleteEntryGroup(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 deleteEntryGroup(DeleteEntryGroupRequest request) { + deleteEntryGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   DeleteEntryGroupRequest request = DeleteEntryGroupRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteEntryGroupCallable() { + return stub.deleteEntryGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the location that contains the entry groups, which can be + * provided in URL format. Example: + *

* projects/{project_id}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntryGroupsPagedResponse listEntryGroups(EntryGroupName parent) { + ListEntryGroupsRequest request = + ListEntryGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEntryGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the location that contains the entry groups, which can be + * provided in URL format. Example: + *

* projects/{project_id}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntryGroupsPagedResponse listEntryGroups(String parent) { + ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().setParent(parent).build(); + return listEntryGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(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 ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request) { + return listEntryGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListEntryGroupsPagedResponse> future = dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (EntryGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listEntryGroupsPagedCallable() { + return stub.listEntryGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListEntryGroupsResponse response = dataCatalogClient.listEntryGroupsCallable().call(request);
+   *     for (EntryGroup element : response.getEntryGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listEntryGroupsCallable() { + return stub.listEntryGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

A maximum of 100,000 entries may be created per entry group. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   String entryId = "";
+   *   Entry entry = Entry.newBuilder().build();
+   *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
+   * }
+   * 
+ * + * @param parent Required. The name of the entry group this entry is in. Example: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + *

Note that this Entry and its child resources may not actually be stored in the location + * in this name. + * @param entryId Required. The id of the entry to create. + * @param entry Required. The entry to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry createEntry(EntryGroupName parent, String entryId, Entry entry) { + CreateEntryRequest request = + CreateEntryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEntryId(entryId) + .setEntry(entry) + .build(); + return createEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

A maximum of 100,000 entries may be created per entry group. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   String entryId = "";
+   *   Entry entry = Entry.newBuilder().build();
+   *   Entry response = dataCatalogClient.createEntry(parent.toString(), entryId, entry);
+   * }
+   * 
+ * + * @param parent Required. The name of the entry group this entry is in. Example: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + *

Note that this Entry and its child resources may not actually be stored in the location + * in this name. + * @param entryId Required. The id of the entry to create. + * @param entry Required. The entry to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry createEntry(String parent, String entryId, Entry entry) { + CreateEntryRequest request = + CreateEntryRequest.newBuilder() + .setParent(parent) + .setEntryId(entryId) + .setEntry(entry) + .build(); + return createEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

A maximum of 100,000 entries may be created per entry group. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   String entryId = "";
+   *   Entry entry = Entry.newBuilder().build();
+   *   CreateEntryRequest request = CreateEntryRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setEntryId(entryId)
+   *     .setEntry(entry)
+   *     .build();
+   *   Entry response = dataCatalogClient.createEntry(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 Entry createEntry(CreateEntryRequest request) { + return createEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. + * + *

Users should enable the Data Catalog API in the project identified by the `parent` parameter + * (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more + * information). + * + *

A maximum of 100,000 entries may be created per entry group. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   String entryId = "";
+   *   Entry entry = Entry.newBuilder().build();
+   *   CreateEntryRequest request = CreateEntryRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setEntryId(entryId)
+   *     .setEntry(entry)
+   *     .build();
+   *   ApiFuture<Entry> future = dataCatalogClient.createEntryCallable().futureCall(request);
+   *   // Do something
+   *   Entry response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createEntryCallable() { + return stub.createEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing entry. Users should enable the Data Catalog API in the project identified + * by the `entry.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Entry entry = Entry.newBuilder().build();
+   *   Entry response = dataCatalogClient.updateEntry(entry);
+   * }
+   * 
+ * + * @param entry Required. The updated entry. The "name" field must be set. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry updateEntry(Entry entry) { + UpdateEntryRequest request = UpdateEntryRequest.newBuilder().setEntry(entry).build(); + return updateEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing entry. Users should enable the Data Catalog API in the project identified + * by the `entry.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Entry entry = Entry.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Entry response = dataCatalogClient.updateEntry(entry, updateMask);
+   * }
+   * 
+ * + * @param entry Required. The updated entry. The "name" field must be set. + * @param updateMask The fields to update on the entry. If absent or empty, all modifiable fields + * are updated. + *

The following fields are modifiable: * For entries with type `DATA_STREAM`: * + * `schema` * For entries with type `FILESET` * `schema` * `display_name` * + * `description` * `gcs_fileset_spec` * `gcs_fileset_spec.file_patterns` * For + * entries with `user_specified_type` * `schema` * `display_name` * `description` + * * user_specified_type * user_specified_system * linked_resource * + * source_system_timestamps + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry updateEntry(Entry entry, FieldMask updateMask) { + UpdateEntryRequest request = + UpdateEntryRequest.newBuilder().setEntry(entry).setUpdateMask(updateMask).build(); + return updateEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing entry. Users should enable the Data Catalog API in the project identified + * by the `entry.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Entry entry = Entry.newBuilder().build();
+   *   UpdateEntryRequest request = UpdateEntryRequest.newBuilder()
+   *     .setEntry(entry)
+   *     .build();
+   *   Entry response = dataCatalogClient.updateEntry(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 Entry updateEntry(UpdateEntryRequest request) { + return updateEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing entry. Users should enable the Data Catalog API in the project identified + * by the `entry.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Entry entry = Entry.newBuilder().build();
+   *   UpdateEntryRequest request = UpdateEntryRequest.newBuilder()
+   *     .setEntry(entry)
+   *     .build();
+   *   ApiFuture<Entry> future = dataCatalogClient.updateEntryCallable().futureCall(request);
+   *   // Do something
+   *   Entry response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateEntryCallable() { + return stub.updateEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an existing entry. Only entries created through + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   dataCatalogClient.deleteEntry(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entry. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntry(EntryName name) { + DeleteEntryRequest request = + DeleteEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an existing entry. Only entries created through + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   dataCatalogClient.deleteEntry(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entry. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntry(String name) { + DeleteEntryRequest request = DeleteEntryRequest.newBuilder().setName(name).build(); + deleteEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an existing entry. Only entries created through + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   DeleteEntryRequest request = DeleteEntryRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   dataCatalogClient.deleteEntry(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 deleteEntry(DeleteEntryRequest request) { + deleteEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an existing entry. Only entries created through + * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method can be deleted. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   DeleteEntryRequest request = DeleteEntryRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = dataCatalogClient.deleteEntryCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteEntryCallable() { + return stub.deleteEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   Entry response = dataCatalogClient.getEntry(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entry. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry getEntry(EntryName name) { + GetEntryRequest request = + GetEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   Entry response = dataCatalogClient.getEntry(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entry. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry getEntry(String name) { + GetEntryRequest request = GetEntryRequest.newBuilder().setName(name).build(); + return getEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   GetEntryRequest request = GetEntryRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Entry response = dataCatalogClient.getEntry(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 Entry getEntry(GetEntryRequest request) { + return getEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   GetEntryRequest request = GetEntryRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Entry> future = dataCatalogClient.getEntryCallable().futureCall(request);
+   *   // Do something
+   *   Entry response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getEntryCallable() { + return stub.getEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an entry by target resource name. This method allows clients to use the resource name from + * the source Google Cloud Platform service to get the Data Catalog Entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+   *   Entry response = dataCatalogClient.lookupEntry(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 Entry lookupEntry(LookupEntryRequest request) { + return lookupEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Get an entry by target resource name. This method allows clients to use the resource name from + * the source Google Cloud Platform service to get the Data Catalog Entry. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
+   *   ApiFuture<Entry> future = dataCatalogClient.lookupEntryCallable().futureCall(request);
+   *   // Do something
+   *   Entry response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable lookupEntryCallable() { + return stub.lookupEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entries. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the entry group that contains the entries, which can be + * provided in URL format. Example: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntriesPagedResponse listEntries(EntryGroupName parent) { + ListEntriesRequest request = + ListEntriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entries. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   for (Entry element : dataCatalogClient.listEntries(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the entry group that contains the entries, which can be + * provided in URL format. Example: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEntriesPagedResponse listEntries(String parent) { + ListEntriesRequest request = ListEntriesRequest.newBuilder().setParent(parent).build(); + return listEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entries. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntriesRequest request = ListEntriesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Entry element : dataCatalogClient.listEntries(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 ListEntriesPagedResponse listEntries(ListEntriesRequest request) { + return listEntriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entries. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntriesRequest request = ListEntriesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListEntriesPagedResponse> future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Entry element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listEntriesPagedCallable() { + return stub.listEntriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists entries. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+   *   ListEntriesRequest request = ListEntriesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListEntriesResponse response = dataCatalogClient.listEntriesCallable().call(request);
+   *     for (Entry element : response.getEntriesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listEntriesCallable() { + return stub.listEntriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag template. The user should enable the Data Catalog API in the project identified + * by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String tagTemplateId = "";
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   TagTemplate response = dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
+   * }
+   * 
+ * + * @param parent Required. The name of the project and the template location + * [region](/compute/docs/regions-zones/#available). NOTE: Currently, only the `us-central1 + * region` is supported. + *

Example: + *

* projects/{project_id}/locations/us-central1 + * @param tagTemplateId Required. The id of the tag template to create. + * @param tagTemplate Required. The tag template to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate createTagTemplate( + LocationName parent, String tagTemplateId, TagTemplate tagTemplate) { + CreateTagTemplateRequest request = + CreateTagTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTagTemplateId(tagTemplateId) + .setTagTemplate(tagTemplate) + .build(); + return createTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag template. The user should enable the Data Catalog API in the project identified + * by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String tagTemplateId = "";
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   TagTemplate response = dataCatalogClient.createTagTemplate(parent.toString(), tagTemplateId, tagTemplate);
+   * }
+   * 
+ * + * @param parent Required. The name of the project and the template location + * [region](/compute/docs/regions-zones/#available). NOTE: Currently, only the `us-central1 + * region` is supported. + *

Example: + *

* projects/{project_id}/locations/us-central1 + * @param tagTemplateId Required. The id of the tag template to create. + * @param tagTemplate Required. The tag template to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate createTagTemplate( + String parent, String tagTemplateId, TagTemplate tagTemplate) { + CreateTagTemplateRequest request = + CreateTagTemplateRequest.newBuilder() + .setParent(parent) + .setTagTemplateId(tagTemplateId) + .setTagTemplate(tagTemplate) + .build(); + return createTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag template. The user should enable the Data Catalog API in the project identified + * by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String tagTemplateId = "";
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   CreateTagTemplateRequest request = CreateTagTemplateRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTagTemplateId(tagTemplateId)
+   *     .setTagTemplate(tagTemplate)
+   *     .build();
+   *   TagTemplate response = dataCatalogClient.createTagTemplate(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 TagTemplate createTagTemplate(CreateTagTemplateRequest request) { + return createTagTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag template. The user should enable the Data Catalog API in the project identified + * by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String tagTemplateId = "";
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   CreateTagTemplateRequest request = CreateTagTemplateRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTagTemplateId(tagTemplateId)
+   *     .setTagTemplate(tagTemplate)
+   *     .build();
+   *   ApiFuture<TagTemplate> future = dataCatalogClient.createTagTemplateCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createTagTemplateCallable() { + return stub.createTagTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a tag template. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template. Example: + *

* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate getTagTemplate(TagTemplateName name) { + GetTagTemplateRequest request = + GetTagTemplateRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a tag template. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   TagTemplate response = dataCatalogClient.getTagTemplate(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the tag template. Example: + *

* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate getTagTemplate(String name) { + GetTagTemplateRequest request = GetTagTemplateRequest.newBuilder().setName(name).build(); + return getTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a tag template. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   GetTagTemplateRequest request = GetTagTemplateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   TagTemplate response = dataCatalogClient.getTagTemplate(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 TagTemplate getTagTemplate(GetTagTemplateRequest request) { + return getTagTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a tag template. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   GetTagTemplateRequest request = GetTagTemplateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<TagTemplate> future = dataCatalogClient.getTagTemplateCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getTagTemplateCallable() { + return stub.getTagTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a tag template. This method cannot be used to update the fields of a template. The tag + * template fields are represented as separate resources and should be updated using their own + * create/update/delete methods. Users should enable the Data Catalog API in the project + * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
+   * }
+   * 
+ * + * @param tagTemplate Required. The template to update. The "name" field must be set. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate updateTagTemplate(TagTemplate tagTemplate) { + UpdateTagTemplateRequest request = + UpdateTagTemplateRequest.newBuilder().setTagTemplate(tagTemplate).build(); + return updateTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a tag template. This method cannot be used to update the fields of a template. The tag + * template fields are represented as separate resources and should be updated using their own + * create/update/delete methods. Users should enable the Data Catalog API in the project + * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
+   * }
+   * 
+ * + * @param tagTemplate Required. The template to update. The "name" field must be set. + * @param updateMask The field mask specifies the parts of the template to overwrite. + *

Allowed fields: + *

* `display_name` + *

If absent or empty, all of the allowed fields above will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask) { + UpdateTagTemplateRequest request = + UpdateTagTemplateRequest.newBuilder() + .setTagTemplate(tagTemplate) + .setUpdateMask(updateMask) + .build(); + return updateTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a tag template. This method cannot be used to update the fields of a template. The tag + * template fields are represented as separate resources and should be updated using their own + * create/update/delete methods. Users should enable the Data Catalog API in the project + * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   UpdateTagTemplateRequest request = UpdateTagTemplateRequest.newBuilder()
+   *     .setTagTemplate(tagTemplate)
+   *     .build();
+   *   TagTemplate response = dataCatalogClient.updateTagTemplate(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 TagTemplate updateTagTemplate(UpdateTagTemplateRequest request) { + return updateTagTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a tag template. This method cannot be used to update the fields of a template. The tag + * template fields are represented as separate resources and should be updated using their own + * create/update/delete methods. Users should enable the Data Catalog API in the project + * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
+   *   UpdateTagTemplateRequest request = UpdateTagTemplateRequest.newBuilder()
+   *     .setTagTemplate(tagTemplate)
+   *     .build();
+   *   ApiFuture<TagTemplate> future = dataCatalogClient.updateTagTemplateCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplate response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateTagTemplateCallable() { + return stub.updateTagTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag template and all tags using the template. Users should enable the Data Catalog + * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   boolean force = false;
+   *   dataCatalogClient.deleteTagTemplate(name, force);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template to delete. Example: + *

* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @param force Required. Currently, this field must always be set to `true`. This confirms the + * deletion of any possible tags using this template. `force = false` will be supported in the + * future. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTagTemplate(TagTemplateName name, boolean force) { + DeleteTagTemplateRequest request = + DeleteTagTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setForce(force) + .build(); + deleteTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag template and all tags using the template. Users should enable the Data Catalog + * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   boolean force = false;
+   *   dataCatalogClient.deleteTagTemplate(name.toString(), force);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template to delete. Example: + *

* projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + * @param force Required. Currently, this field must always be set to `true`. This confirms the + * deletion of any possible tags using this template. `force = false` will be supported in the + * future. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTagTemplate(String name, boolean force) { + DeleteTagTemplateRequest request = + DeleteTagTemplateRequest.newBuilder().setName(name).setForce(force).build(); + deleteTagTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag template and all tags using the template. Users should enable the Data Catalog + * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   boolean force = false;
+   *   DeleteTagTemplateRequest request = DeleteTagTemplateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setForce(force)
+   *     .build();
+   *   dataCatalogClient.deleteTagTemplate(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 deleteTagTemplate(DeleteTagTemplateRequest request) { + deleteTagTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag template and all tags using the template. Users should enable the Data Catalog + * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] + * (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   boolean force = false;
+   *   DeleteTagTemplateRequest request = DeleteTagTemplateRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setForce(force)
+   *     .build();
+   *   ApiFuture<Void> future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTagTemplateCallable() { + return stub.deleteTagTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   String tagTemplateFieldId = "";
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
+   * }
+   * 
+ * + * @param parent Required. The name of the project and the template location + * [region](/compute/docs/regions-zones/#available). NOTE: Currently, only the `us-central1 + * region` is supported. + *

Example: + *

* projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can + * contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes + * (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs + * must also be unique within their template. + * @param tagTemplateField Required. The tag template field to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField createTagTemplateField( + TagTemplateName parent, String tagTemplateFieldId, TagTemplateField tagTemplateField) { + CreateTagTemplateFieldRequest request = + CreateTagTemplateFieldRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTagTemplateFieldId(tagTemplateFieldId) + .setTagTemplateField(tagTemplateField) + .build(); + return createTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   String tagTemplateFieldId = "";
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.createTagTemplateField(parent.toString(), tagTemplateFieldId, tagTemplateField);
+   * }
+   * 
+ * + * @param parent Required. The name of the project and the template location + * [region](/compute/docs/regions-zones/#available). NOTE: Currently, only the `us-central1 + * region` is supported. + *

Example: + *

* projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can + * contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes + * (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs + * must also be unique within their template. + * @param tagTemplateField Required. The tag template field to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField createTagTemplateField( + String parent, String tagTemplateFieldId, TagTemplateField tagTemplateField) { + CreateTagTemplateFieldRequest request = + CreateTagTemplateFieldRequest.newBuilder() + .setParent(parent) + .setTagTemplateFieldId(tagTemplateFieldId) + .setTagTemplateField(tagTemplateField) + .build(); + return createTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   String tagTemplateFieldId = "";
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   CreateTagTemplateFieldRequest request = CreateTagTemplateFieldRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTagTemplateFieldId(tagTemplateFieldId)
+   *     .setTagTemplateField(tagTemplateField)
+   *     .build();
+   *   TagTemplateField response = dataCatalogClient.createTagTemplateField(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 TagTemplateField createTagTemplateField(CreateTagTemplateFieldRequest request) { + return createTagTemplateFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `parent` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
+   *   String tagTemplateFieldId = "";
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   CreateTagTemplateFieldRequest request = CreateTagTemplateFieldRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTagTemplateFieldId(tagTemplateFieldId)
+   *     .setTagTemplateField(tagTemplateField)
+   *     .build();
+   *   ApiFuture<TagTemplateField> future = dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplateField response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createTagTemplateFieldCallable() { + return stub.createTagTemplateFieldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param tagTemplateField Required. The template to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField updateTagTemplateField( + TagTemplateFieldName name, TagTemplateField tagTemplateField) { + UpdateTagTemplateFieldRequest request = + UpdateTagTemplateFieldRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setTagTemplateField(tagTemplateField) + .build(); + return updateTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name.toString(), tagTemplateField);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param tagTemplateField Required. The template to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField updateTagTemplateField( + String name, TagTemplateField tagTemplateField) { + UpdateTagTemplateFieldRequest request = + UpdateTagTemplateFieldRequest.newBuilder() + .setName(name) + .setTagTemplateField(tagTemplateField) + .build(); + return updateTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param tagTemplateField Required. The template to update. + * @param updateMask Optional. The field mask specifies the parts of the template to be updated. + * Allowed fields: + *

* `display_name` * `type.enum_type` * `is_required` + *

If `update_mask` is not set or empty, all of the allowed fields above will be updated. + *

When updating an enum type, the provided values will be merged with the existing values. + * Therefore, enum values can only be added, existing enum values cannot be deleted nor + * renamed. Updating a template field from optional to required is NOT allowed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField updateTagTemplateField( + TagTemplateFieldName name, TagTemplateField tagTemplateField, FieldMask updateMask) { + UpdateTagTemplateFieldRequest request = + UpdateTagTemplateFieldRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setTagTemplateField(tagTemplateField) + .setUpdateMask(updateMask) + .build(); + return updateTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name.toString(), tagTemplateField, updateMask);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param tagTemplateField Required. The template to update. + * @param updateMask Optional. The field mask specifies the parts of the template to be updated. + * Allowed fields: + *

* `display_name` * `type.enum_type` * `is_required` + *

If `update_mask` is not set or empty, all of the allowed fields above will be updated. + *

When updating an enum type, the provided values will be merged with the existing values. + * Therefore, enum values can only be added, existing enum values cannot be deleted nor + * renamed. Updating a template field from optional to required is NOT allowed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField updateTagTemplateField( + String name, TagTemplateField tagTemplateField, FieldMask updateMask) { + UpdateTagTemplateFieldRequest request = + UpdateTagTemplateFieldRequest.newBuilder() + .setName(name) + .setTagTemplateField(tagTemplateField) + .setUpdateMask(updateMask) + .build(); + return updateTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   UpdateTagTemplateFieldRequest request = UpdateTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setTagTemplateField(tagTemplateField)
+   *     .build();
+   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(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 TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldRequest request) { + return updateTagTemplateFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field in a tag template. This method cannot be used to update the field type. Users + * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data + * Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
+   *   UpdateTagTemplateFieldRequest request = UpdateTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setTagTemplateField(tagTemplateField)
+   *     .build();
+   *   ApiFuture<TagTemplateField> future = dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplateField response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + updateTagTemplateFieldCallable() { + return stub.updateTagTemplateFieldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renames a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   String newTagTemplateFieldId = "";
+   *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param newTagTemplateFieldId Required. The new ID of this tag template field. For example, + * `my_new_field`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField renameTagTemplateField( + TagTemplateFieldName name, String newTagTemplateFieldId) { + RenameTagTemplateFieldRequest request = + RenameTagTemplateFieldRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setNewTagTemplateFieldId(newTagTemplateFieldId) + .build(); + return renameTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renames a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   String newTagTemplateFieldId = "";
+   *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(name.toString(), newTagTemplateFieldId);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param newTagTemplateFieldId Required. The new ID of this tag template field. For example, + * `my_new_field`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField renameTagTemplateField(String name, String newTagTemplateFieldId) { + RenameTagTemplateFieldRequest request = + RenameTagTemplateFieldRequest.newBuilder() + .setName(name) + .setNewTagTemplateFieldId(newTagTemplateFieldId) + .build(); + return renameTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renames a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   String newTagTemplateFieldId = "";
+   *   RenameTagTemplateFieldRequest request = RenameTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setNewTagTemplateFieldId(newTagTemplateFieldId)
+   *     .build();
+   *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(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 TagTemplateField renameTagTemplateField(RenameTagTemplateFieldRequest request) { + return renameTagTemplateFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renames a field in a tag template. The user should enable the Data Catalog API in the project + * identified by the `name` parameter (see [Data Catalog Resource + * Project](/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   String newTagTemplateFieldId = "";
+   *   RenameTagTemplateFieldRequest request = RenameTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setNewTagTemplateFieldId(newTagTemplateFieldId)
+   *     .build();
+   *   ApiFuture<TagTemplateField> future = dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
+   *   // Do something
+   *   TagTemplateField response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + renameTagTemplateFieldCallable() { + return stub.renameTagTemplateFieldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a field in a tag template and all uses of that field. Users should enable the Data + * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource + * Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   boolean force = false;
+   *   dataCatalogClient.deleteTagTemplateField(name, force);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field to delete. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param force Required. Currently, this field must always be set to `true`. This confirms the + * deletion of this field from any tags using this field. `force = false` will be supported in + * the future. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTagTemplateField(TagTemplateFieldName name, boolean force) { + DeleteTagTemplateFieldRequest request = + DeleteTagTemplateFieldRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setForce(force) + .build(); + deleteTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a field in a tag template and all uses of that field. Users should enable the Data + * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource + * Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   boolean force = false;
+   *   dataCatalogClient.deleteTagTemplateField(name.toString(), force);
+   * }
+   * 
+ * + * @param name Required. The name of the tag template field to delete. Example: + *

* + * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + * @param force Required. Currently, this field must always be set to `true`. This confirms the + * deletion of this field from any tags using this field. `force = false` will be supported in + * the future. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTagTemplateField(String name, boolean force) { + DeleteTagTemplateFieldRequest request = + DeleteTagTemplateFieldRequest.newBuilder().setName(name).setForce(force).build(); + deleteTagTemplateField(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a field in a tag template and all uses of that field. Users should enable the Data + * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource + * Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   boolean force = false;
+   *   DeleteTagTemplateFieldRequest request = DeleteTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setForce(force)
+   *     .build();
+   *   dataCatalogClient.deleteTagTemplateField(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 deleteTagTemplateField(DeleteTagTemplateFieldRequest request) { + deleteTagTemplateFieldCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a field in a tag template and all uses of that field. Users should enable the Data + * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource + * Project] (/data-catalog/docs/concepts/resource-project) for more information). + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagTemplateFieldName name = TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
+   *   boolean force = false;
+   *   DeleteTagTemplateFieldRequest request = DeleteTagTemplateFieldRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setForce(force)
+   *     .build();
+   *   ApiFuture<Void> future = dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + deleteTagTemplateFieldCallable() { + return stub.deleteTagTemplateFieldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. Note: The project identified by + * the `parent` parameter for the + * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag + * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be from the same organization. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
+   *   Tag tag = Tag.newBuilder().build();
+   *   Tag response = dataCatalogClient.createTag(parent, tag);
+   * }
+   * 
+ * + * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to + * Entries. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + *

Note that this Tag and its child resources may not actually be stored in the location in + * this name. + * @param tag Required. The tag to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tag createTag(TagName parent, Tag tag) { + CreateTagRequest request = + CreateTagRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTag(tag) + .build(); + return createTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. Note: The project identified by + * the `parent` parameter for the + * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag + * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be from the same organization. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
+   *   Tag tag = Tag.newBuilder().build();
+   *   Tag response = dataCatalogClient.createTag(parent.toString(), tag);
+   * }
+   * 
+ * + * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to + * Entries. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + *

Note that this Tag and its child resources may not actually be stored in the location in + * this name. + * @param tag Required. The tag to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tag createTag(String parent, Tag tag) { + CreateTagRequest request = CreateTagRequest.newBuilder().setParent(parent).setTag(tag).build(); + return createTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. Note: The project identified by + * the `parent` parameter for the + * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag + * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be from the same organization. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
+   *   Tag tag = Tag.newBuilder().build();
+   *   CreateTagRequest request = CreateTagRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTag(tag)
+   *     .build();
+   *   Tag response = dataCatalogClient.createTag(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 Tag createTag(CreateTagRequest request) { + return createTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. Note: The project identified by + * the `parent` parameter for the + * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + * and the [tag + * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + * used to create the tag must be from the same organization. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
+   *   Tag tag = Tag.newBuilder().build();
+   *   CreateTagRequest request = CreateTagRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTag(tag)
+   *     .build();
+   *   ApiFuture<Tag> future = dataCatalogClient.createTagCallable().futureCall(request);
+   *   // Do something
+   *   Tag response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createTagCallable() { + return stub.createTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Tag tag = Tag.newBuilder().build();
+   *   Tag response = dataCatalogClient.updateTag(tag);
+   * }
+   * 
+ * + * @param tag Required. The updated tag. The "name" field must be set. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tag updateTag(Tag tag) { + UpdateTagRequest request = UpdateTagRequest.newBuilder().setTag(tag).build(); + return updateTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Tag tag = Tag.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Tag response = dataCatalogClient.updateTag(tag, updateMask);
+   * }
+   * 
+ * + * @param tag Required. The updated tag. The "name" field must be set. + * @param updateMask The fields to update on the Tag. If absent or empty, all modifiable fields + * are updated. Currently the only modifiable field is the field `fields`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tag updateTag(Tag tag, FieldMask updateMask) { + UpdateTagRequest request = + UpdateTagRequest.newBuilder().setTag(tag).setUpdateMask(updateMask).build(); + return updateTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Tag tag = Tag.newBuilder().build();
+   *   UpdateTagRequest request = UpdateTagRequest.newBuilder()
+   *     .setTag(tag)
+   *     .build();
+   *   Tag response = dataCatalogClient.updateTag(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 Tag updateTag(UpdateTagRequest request) { + return updateTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an existing tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   Tag tag = Tag.newBuilder().build();
+   *   UpdateTagRequest request = UpdateTagRequest.newBuilder()
+   *     .setTag(tag)
+   *     .build();
+   *   ApiFuture<Tag> future = dataCatalogClient.updateTagCallable().futureCall(request);
+   *   // Do something
+   *   Tag response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateTagCallable() { + return stub.updateTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   dataCatalogClient.deleteTag(name);
+   * }
+   * 
+ * + * @param name Required. The name of the tag to delete. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTag(EntryName name) { + DeleteTagRequest request = + DeleteTagRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   dataCatalogClient.deleteTag(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the tag to delete. Example: + *

* + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTag(String name) { + DeleteTagRequest request = DeleteTagRequest.newBuilder().setName(name).build(); + deleteTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   DeleteTagRequest request = DeleteTagRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   dataCatalogClient.deleteTag(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 deleteTag(DeleteTagRequest request) { + deleteTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a tag. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   DeleteTagRequest request = DeleteTagRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = dataCatalogClient.deleteTagCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTagCallable() { + return stub.deleteTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource + * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an + * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + *

Examples: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} * + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTagsPagedResponse listTags(EntryName parent) { + ListTagsRequest request = + ListTagsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listTags(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   for (Tag element : dataCatalogClient.listTags(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource + * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an + * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + *

Examples: + *

* projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} * + * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTagsPagedResponse listTags(String parent) { + ListTagsRequest request = ListTagsRequest.newBuilder().setParent(parent).build(); + return listTags(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   ListTagsRequest request = ListTagsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Tag element : dataCatalogClient.listTags(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 ListTagsPagedResponse listTags(ListTagsRequest request) { + return listTagsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   ListTagsRequest request = ListTagsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTagsPagedResponse> future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Tag element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listTagsPagedCallable() { + return stub.listTagsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   ListTagsRequest request = ListTagsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
+   *     for (Tag element : response.getTagsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listTagsCallable() { + return stub.listTagsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a resource. Replaces any existing policy. Supported + * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to + * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced + * to Data Catalog. + * + *

Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` + * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on + * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   Policy response = dataCatalogClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a resource. Replaces any existing policy. Supported + * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to + * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced + * to Data Catalog. + * + *

Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` + * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on + * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   ApiFuture<Policy> future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   Policy response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource + * does not exist. An empty policy is returned if the resource exists but does not have a policy + * set on it. + * + *

Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method + * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform + * resources synced to Data Catalog. + * + *

Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` + * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on + * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   Policy response = dataCatalogClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource + * does not exist. An empty policy is returned if the resource exists but does not have a policy + * set on it. + * + *

Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method + * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform + * resources synced to Data Catalog. + * + *

Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` + * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on + * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   ApiFuture<Policy> future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   Policy response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of + * permissions is returned (We don't return a `NOT_FOUND` error). + * + *

Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method + * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform + * resources synced to Data Catalog. + * + *

A caller is not required to have Google IAM permission to make this request. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of + * permissions is returned (We don't return a `NOT_FOUND` error). + * + *

Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method + * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform + * resources synced to Data Catalog. + * + *

A caller is not required to have Google IAM permission to make this request. + * + *

Sample code: + * + *


+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   ApiFuture<TestIamPermissionsResponse> future = dataCatalogClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 SearchCatalogPagedResponse + extends AbstractPagedListResponse< + SearchCatalogRequest, + SearchCatalogResponse, + SearchCatalogResult, + SearchCatalogPage, + SearchCatalogFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchCatalogPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public SearchCatalogPagedResponse apply(SearchCatalogPage input) { + return new SearchCatalogPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private SearchCatalogPagedResponse(SearchCatalogPage page) { + super(page, SearchCatalogFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchCatalogPage + extends AbstractPage< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult, SearchCatalogPage> { + + private SearchCatalogPage( + PageContext context, + SearchCatalogResponse response) { + super(context, response); + } + + private static SearchCatalogPage createEmptyPage() { + return new SearchCatalogPage(null, null); + } + + @Override + protected SearchCatalogPage createPage( + PageContext context, + SearchCatalogResponse response) { + return new SearchCatalogPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchCatalogFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchCatalogRequest, + SearchCatalogResponse, + SearchCatalogResult, + SearchCatalogPage, + SearchCatalogFixedSizeCollection> { + + private SearchCatalogFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchCatalogFixedSizeCollection createEmptyCollection() { + return new SearchCatalogFixedSizeCollection(null, 0); + } + + @Override + protected SearchCatalogFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchCatalogFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEntryGroupsPagedResponse + extends AbstractPagedListResponse< + ListEntryGroupsRequest, + ListEntryGroupsResponse, + EntryGroup, + ListEntryGroupsPage, + ListEntryGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEntryGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEntryGroupsPagedResponse apply(ListEntryGroupsPage input) { + return new ListEntryGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEntryGroupsPagedResponse(ListEntryGroupsPage page) { + super(page, ListEntryGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEntryGroupsPage + extends AbstractPage< + ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup, ListEntryGroupsPage> { + + private ListEntryGroupsPage( + PageContext context, + ListEntryGroupsResponse response) { + super(context, response); + } + + private static ListEntryGroupsPage createEmptyPage() { + return new ListEntryGroupsPage(null, null); + } + + @Override + protected ListEntryGroupsPage createPage( + PageContext context, + ListEntryGroupsResponse response) { + return new ListEntryGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEntryGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEntryGroupsRequest, + ListEntryGroupsResponse, + EntryGroup, + ListEntryGroupsPage, + ListEntryGroupsFixedSizeCollection> { + + private ListEntryGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEntryGroupsFixedSizeCollection createEmptyCollection() { + return new ListEntryGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListEntryGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEntryGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEntriesPagedResponse + extends AbstractPagedListResponse< + ListEntriesRequest, + ListEntriesResponse, + Entry, + ListEntriesPage, + ListEntriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEntriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEntriesPagedResponse apply(ListEntriesPage input) { + return new ListEntriesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEntriesPagedResponse(ListEntriesPage page) { + super(page, ListEntriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEntriesPage + extends AbstractPage { + + private ListEntriesPage( + PageContext context, + ListEntriesResponse response) { + super(context, response); + } + + private static ListEntriesPage createEmptyPage() { + return new ListEntriesPage(null, null); + } + + @Override + protected ListEntriesPage createPage( + PageContext context, + ListEntriesResponse response) { + return new ListEntriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEntriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEntriesRequest, + ListEntriesResponse, + Entry, + ListEntriesPage, + ListEntriesFixedSizeCollection> { + + private ListEntriesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEntriesFixedSizeCollection createEmptyCollection() { + return new ListEntriesFixedSizeCollection(null, 0); + } + + @Override + protected ListEntriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEntriesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTagsPagedResponse + extends AbstractPagedListResponse< + ListTagsRequest, ListTagsResponse, Tag, ListTagsPage, ListTagsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTagsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTagsPagedResponse apply(ListTagsPage input) { + return new ListTagsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTagsPagedResponse(ListTagsPage page) { + super(page, ListTagsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTagsPage + extends AbstractPage { + + private ListTagsPage( + PageContext context, ListTagsResponse response) { + super(context, response); + } + + private static ListTagsPage createEmptyPage() { + return new ListTagsPage(null, null); + } + + @Override + protected ListTagsPage createPage( + PageContext context, ListTagsResponse response) { + return new ListTagsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTagsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTagsRequest, ListTagsResponse, Tag, ListTagsPage, ListTagsFixedSizeCollection> { + + private ListTagsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTagsFixedSizeCollection createEmptyCollection() { + return new ListTagsFixedSizeCollection(null, 0); + } + + @Override + protected ListTagsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTagsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java new file mode 100644 index 00000000..dd95556c --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java @@ -0,0 +1,475 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1; + +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntriesPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntryGroupsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse; + +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.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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.v1.stub.DataCatalogStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 DataCatalogClient}. + * + *

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

    + *
  • The default service address (datacatalog.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 createEntryGroup to 30 seconds: + * + *

+ * 
+ * DataCatalogSettings.Builder dataCatalogSettingsBuilder =
+ *     DataCatalogSettings.newBuilder();
+ * dataCatalogSettingsBuilder
+ *     .createEntryGroupSettings()
+ *     .setRetrySettings(
+ *         dataCatalogSettingsBuilder.createEntryGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataCatalogSettings dataCatalogSettings = dataCatalogSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogSettings extends ClientSettings { + /** Returns the object with the settings used for calls to searchCatalog. */ + public PagedCallSettings + searchCatalogSettings() { + return ((DataCatalogStubSettings) getStubSettings()).searchCatalogSettings(); + } + + /** Returns the object with the settings used for calls to createEntryGroup. */ + public UnaryCallSettings createEntryGroupSettings() { + return ((DataCatalogStubSettings) getStubSettings()).createEntryGroupSettings(); + } + + /** Returns the object with the settings used for calls to getEntryGroup. */ + public UnaryCallSettings getEntryGroupSettings() { + return ((DataCatalogStubSettings) getStubSettings()).getEntryGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateEntryGroup. */ + public UnaryCallSettings updateEntryGroupSettings() { + return ((DataCatalogStubSettings) getStubSettings()).updateEntryGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteEntryGroup. */ + public UnaryCallSettings deleteEntryGroupSettings() { + return ((DataCatalogStubSettings) getStubSettings()).deleteEntryGroupSettings(); + } + + /** Returns the object with the settings used for calls to listEntryGroups. */ + public PagedCallSettings< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings() { + return ((DataCatalogStubSettings) getStubSettings()).listEntryGroupsSettings(); + } + + /** Returns the object with the settings used for calls to createEntry. */ + public UnaryCallSettings createEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).createEntrySettings(); + } + + /** Returns the object with the settings used for calls to updateEntry. */ + public UnaryCallSettings updateEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).updateEntrySettings(); + } + + /** Returns the object with the settings used for calls to deleteEntry. */ + public UnaryCallSettings deleteEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).deleteEntrySettings(); + } + + /** Returns the object with the settings used for calls to getEntry. */ + public UnaryCallSettings getEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).getEntrySettings(); + } + + /** Returns the object with the settings used for calls to lookupEntry. */ + public UnaryCallSettings lookupEntrySettings() { + return ((DataCatalogStubSettings) getStubSettings()).lookupEntrySettings(); + } + + /** Returns the object with the settings used for calls to listEntries. */ + public PagedCallSettings + listEntriesSettings() { + return ((DataCatalogStubSettings) getStubSettings()).listEntriesSettings(); + } + + /** Returns the object with the settings used for calls to createTagTemplate. */ + public UnaryCallSettings createTagTemplateSettings() { + return ((DataCatalogStubSettings) getStubSettings()).createTagTemplateSettings(); + } + + /** Returns the object with the settings used for calls to getTagTemplate. */ + public UnaryCallSettings getTagTemplateSettings() { + return ((DataCatalogStubSettings) getStubSettings()).getTagTemplateSettings(); + } + + /** Returns the object with the settings used for calls to updateTagTemplate. */ + public UnaryCallSettings updateTagTemplateSettings() { + return ((DataCatalogStubSettings) getStubSettings()).updateTagTemplateSettings(); + } + + /** Returns the object with the settings used for calls to deleteTagTemplate. */ + public UnaryCallSettings deleteTagTemplateSettings() { + return ((DataCatalogStubSettings) getStubSettings()).deleteTagTemplateSettings(); + } + + /** Returns the object with the settings used for calls to createTagTemplateField. */ + public UnaryCallSettings + createTagTemplateFieldSettings() { + return ((DataCatalogStubSettings) getStubSettings()).createTagTemplateFieldSettings(); + } + + /** Returns the object with the settings used for calls to updateTagTemplateField. */ + public UnaryCallSettings + updateTagTemplateFieldSettings() { + return ((DataCatalogStubSettings) getStubSettings()).updateTagTemplateFieldSettings(); + } + + /** Returns the object with the settings used for calls to renameTagTemplateField. */ + public UnaryCallSettings + renameTagTemplateFieldSettings() { + return ((DataCatalogStubSettings) getStubSettings()).renameTagTemplateFieldSettings(); + } + + /** Returns the object with the settings used for calls to deleteTagTemplateField. */ + public UnaryCallSettings deleteTagTemplateFieldSettings() { + return ((DataCatalogStubSettings) getStubSettings()).deleteTagTemplateFieldSettings(); + } + + /** Returns the object with the settings used for calls to createTag. */ + public UnaryCallSettings createTagSettings() { + return ((DataCatalogStubSettings) getStubSettings()).createTagSettings(); + } + + /** Returns the object with the settings used for calls to updateTag. */ + public UnaryCallSettings updateTagSettings() { + return ((DataCatalogStubSettings) getStubSettings()).updateTagSettings(); + } + + /** Returns the object with the settings used for calls to deleteTag. */ + public UnaryCallSettings deleteTagSettings() { + return ((DataCatalogStubSettings) getStubSettings()).deleteTagSettings(); + } + + /** Returns the object with the settings used for calls to listTags. */ + public PagedCallSettings + listTagsSettings() { + return ((DataCatalogStubSettings) getStubSettings()).listTagsSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataCatalogStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataCatalogStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataCatalogStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final DataCatalogSettings create(DataCatalogStubSettings stub) throws IOException { + return new DataCatalogSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataCatalogStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataCatalogStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataCatalogStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataCatalogStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataCatalogStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataCatalogStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataCatalogStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataCatalogSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataCatalogSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(DataCatalogStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(DataCatalogStubSettings.newBuilder()); + } + + protected Builder(DataCatalogSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataCatalogStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public DataCatalogStubSettings.Builder getStubSettingsBuilder() { + return ((DataCatalogStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to searchCatalog. */ + public PagedCallSettings.Builder< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse> + searchCatalogSettings() { + return getStubSettingsBuilder().searchCatalogSettings(); + } + + /** Returns the builder for the settings used for calls to createEntryGroup. */ + public UnaryCallSettings.Builder + createEntryGroupSettings() { + return getStubSettingsBuilder().createEntryGroupSettings(); + } + + /** Returns the builder for the settings used for calls to getEntryGroup. */ + public UnaryCallSettings.Builder getEntryGroupSettings() { + return getStubSettingsBuilder().getEntryGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateEntryGroup. */ + public UnaryCallSettings.Builder + updateEntryGroupSettings() { + return getStubSettingsBuilder().updateEntryGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEntryGroup. */ + public UnaryCallSettings.Builder deleteEntryGroupSettings() { + return getStubSettingsBuilder().deleteEntryGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listEntryGroups. */ + public PagedCallSettings.Builder< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings() { + return getStubSettingsBuilder().listEntryGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to createEntry. */ + public UnaryCallSettings.Builder createEntrySettings() { + return getStubSettingsBuilder().createEntrySettings(); + } + + /** Returns the builder for the settings used for calls to updateEntry. */ + public UnaryCallSettings.Builder updateEntrySettings() { + return getStubSettingsBuilder().updateEntrySettings(); + } + + /** Returns the builder for the settings used for calls to deleteEntry. */ + public UnaryCallSettings.Builder deleteEntrySettings() { + return getStubSettingsBuilder().deleteEntrySettings(); + } + + /** Returns the builder for the settings used for calls to getEntry. */ + public UnaryCallSettings.Builder getEntrySettings() { + return getStubSettingsBuilder().getEntrySettings(); + } + + /** Returns the builder for the settings used for calls to lookupEntry. */ + public UnaryCallSettings.Builder lookupEntrySettings() { + return getStubSettingsBuilder().lookupEntrySettings(); + } + + /** Returns the builder for the settings used for calls to listEntries. */ + public PagedCallSettings.Builder< + ListEntriesRequest, ListEntriesResponse, ListEntriesPagedResponse> + listEntriesSettings() { + return getStubSettingsBuilder().listEntriesSettings(); + } + + /** Returns the builder for the settings used for calls to createTagTemplate. */ + public UnaryCallSettings.Builder + createTagTemplateSettings() { + return getStubSettingsBuilder().createTagTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to getTagTemplate. */ + public UnaryCallSettings.Builder getTagTemplateSettings() { + return getStubSettingsBuilder().getTagTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to updateTagTemplate. */ + public UnaryCallSettings.Builder + updateTagTemplateSettings() { + return getStubSettingsBuilder().updateTagTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTagTemplate. */ + public UnaryCallSettings.Builder deleteTagTemplateSettings() { + return getStubSettingsBuilder().deleteTagTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to createTagTemplateField. */ + public UnaryCallSettings.Builder + createTagTemplateFieldSettings() { + return getStubSettingsBuilder().createTagTemplateFieldSettings(); + } + + /** Returns the builder for the settings used for calls to updateTagTemplateField. */ + public UnaryCallSettings.Builder + updateTagTemplateFieldSettings() { + return getStubSettingsBuilder().updateTagTemplateFieldSettings(); + } + + /** Returns the builder for the settings used for calls to renameTagTemplateField. */ + public UnaryCallSettings.Builder + renameTagTemplateFieldSettings() { + return getStubSettingsBuilder().renameTagTemplateFieldSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTagTemplateField. */ + public UnaryCallSettings.Builder + deleteTagTemplateFieldSettings() { + return getStubSettingsBuilder().deleteTagTemplateFieldSettings(); + } + + /** Returns the builder for the settings used for calls to createTag. */ + public UnaryCallSettings.Builder createTagSettings() { + return getStubSettingsBuilder().createTagSettings(); + } + + /** Returns the builder for the settings used for calls to updateTag. */ + public UnaryCallSettings.Builder updateTagSettings() { + return getStubSettingsBuilder().updateTagSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTag. */ + public UnaryCallSettings.Builder deleteTagSettings() { + return getStubSettingsBuilder().deleteTagSettings(); + } + + /** Returns the builder for the settings used for calls to listTags. */ + public PagedCallSettings.Builder + listTagsSettings() { + return getStubSettingsBuilder().listTagsSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataCatalogSettings build() throws IOException { + return new DataCatalogSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java new file mode 100644 index 00000000..64ff4c5d --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * 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. + */ + +/** + * A client to Google Cloud Data Catalog API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

================= DataCatalogClient ================= + * + *

Service Description: Data Catalog API service allows clients to discover, understand, and + * manage their data. + * + *

Sample for DataCatalogClient: + * + *

+ * 
+ * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   String entryGroupId = "";
+ *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.datacatalog.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java new file mode 100644 index 00000000..7064d108 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java @@ -0,0 +1,209 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntriesPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntryGroupsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.CreateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.CreateEntryRequest; +import com.google.cloud.datacatalog.v1.CreateTagRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryRequest; +import com.google.cloud.datacatalog.v1.DeleteTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest; +import com.google.cloud.datacatalog.v1.Entry; +import com.google.cloud.datacatalog.v1.EntryGroup; +import com.google.cloud.datacatalog.v1.GetEntryGroupRequest; +import com.google.cloud.datacatalog.v1.GetEntryRequest; +import com.google.cloud.datacatalog.v1.GetTagTemplateRequest; +import com.google.cloud.datacatalog.v1.ListEntriesRequest; +import com.google.cloud.datacatalog.v1.ListEntriesResponse; +import com.google.cloud.datacatalog.v1.ListEntryGroupsRequest; +import com.google.cloud.datacatalog.v1.ListEntryGroupsResponse; +import com.google.cloud.datacatalog.v1.ListTagsRequest; +import com.google.cloud.datacatalog.v1.ListTagsResponse; +import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogResponse; +import com.google.cloud.datacatalog.v1.Tag; +import com.google.cloud.datacatalog.v1.TagTemplate; +import com.google.cloud.datacatalog.v1.TagTemplateField; +import com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.UpdateEntryRequest; +import com.google.cloud.datacatalog.v1.UpdateTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Google Cloud Data Catalog API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class DataCatalogStub implements BackgroundResource { + + public UnaryCallable + searchCatalogPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchCatalogPagedCallable()"); + } + + public UnaryCallable searchCatalogCallable() { + throw new UnsupportedOperationException("Not implemented: searchCatalogCallable()"); + } + + public UnaryCallable createEntryGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createEntryGroupCallable()"); + } + + public UnaryCallable getEntryGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getEntryGroupCallable()"); + } + + public UnaryCallable updateEntryGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateEntryGroupCallable()"); + } + + public UnaryCallable deleteEntryGroupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEntryGroupCallable()"); + } + + public UnaryCallable + listEntryGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEntryGroupsPagedCallable()"); + } + + public UnaryCallable listEntryGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listEntryGroupsCallable()"); + } + + public UnaryCallable createEntryCallable() { + throw new UnsupportedOperationException("Not implemented: createEntryCallable()"); + } + + public UnaryCallable updateEntryCallable() { + throw new UnsupportedOperationException("Not implemented: updateEntryCallable()"); + } + + public UnaryCallable deleteEntryCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEntryCallable()"); + } + + public UnaryCallable getEntryCallable() { + throw new UnsupportedOperationException("Not implemented: getEntryCallable()"); + } + + public UnaryCallable lookupEntryCallable() { + throw new UnsupportedOperationException("Not implemented: lookupEntryCallable()"); + } + + public UnaryCallable listEntriesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEntriesPagedCallable()"); + } + + public UnaryCallable listEntriesCallable() { + throw new UnsupportedOperationException("Not implemented: listEntriesCallable()"); + } + + public UnaryCallable createTagTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: createTagTemplateCallable()"); + } + + public UnaryCallable getTagTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: getTagTemplateCallable()"); + } + + public UnaryCallable updateTagTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: updateTagTemplateCallable()"); + } + + public UnaryCallable deleteTagTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTagTemplateCallable()"); + } + + public UnaryCallable + createTagTemplateFieldCallable() { + throw new UnsupportedOperationException("Not implemented: createTagTemplateFieldCallable()"); + } + + public UnaryCallable + updateTagTemplateFieldCallable() { + throw new UnsupportedOperationException("Not implemented: updateTagTemplateFieldCallable()"); + } + + public UnaryCallable + renameTagTemplateFieldCallable() { + throw new UnsupportedOperationException("Not implemented: renameTagTemplateFieldCallable()"); + } + + public UnaryCallable deleteTagTemplateFieldCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTagTemplateFieldCallable()"); + } + + public UnaryCallable createTagCallable() { + throw new UnsupportedOperationException("Not implemented: createTagCallable()"); + } + + public UnaryCallable updateTagCallable() { + throw new UnsupportedOperationException("Not implemented: updateTagCallable()"); + } + + public UnaryCallable deleteTagCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTagCallable()"); + } + + public UnaryCallable listTagsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTagsPagedCallable()"); + } + + public UnaryCallable listTagsCallable() { + throw new UnsupportedOperationException("Not implemented: listTagsCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java new file mode 100644 index 00000000..ad2afb6c --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java @@ -0,0 +1,1193 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntriesPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntryGroupsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse; + +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.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.cloud.datacatalog.v1.CreateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.CreateEntryRequest; +import com.google.cloud.datacatalog.v1.CreateTagRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryRequest; +import com.google.cloud.datacatalog.v1.DeleteTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest; +import com.google.cloud.datacatalog.v1.Entry; +import com.google.cloud.datacatalog.v1.EntryGroup; +import com.google.cloud.datacatalog.v1.GetEntryGroupRequest; +import com.google.cloud.datacatalog.v1.GetEntryRequest; +import com.google.cloud.datacatalog.v1.GetTagTemplateRequest; +import com.google.cloud.datacatalog.v1.ListEntriesRequest; +import com.google.cloud.datacatalog.v1.ListEntriesResponse; +import com.google.cloud.datacatalog.v1.ListEntryGroupsRequest; +import com.google.cloud.datacatalog.v1.ListEntryGroupsResponse; +import com.google.cloud.datacatalog.v1.ListTagsRequest; +import com.google.cloud.datacatalog.v1.ListTagsResponse; +import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogResponse; +import com.google.cloud.datacatalog.v1.SearchCatalogResult; +import com.google.cloud.datacatalog.v1.Tag; +import com.google.cloud.datacatalog.v1.TagTemplate; +import com.google.cloud.datacatalog.v1.TagTemplateField; +import com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.UpdateEntryRequest; +import com.google.cloud.datacatalog.v1.UpdateTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 DataCatalogStub}. + * + *

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

    + *
  • The default service address (datacatalog.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 createEntryGroup to 30 seconds: + * + *

+ * 
+ * DataCatalogStubSettings.Builder dataCatalogSettingsBuilder =
+ *     DataCatalogStubSettings.newBuilder();
+ * dataCatalogSettingsBuilder
+ *     .createEntryGroupSettings()
+ *     .setRetrySettings(
+ *         dataCatalogSettingsBuilder.createEntryGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataCatalogStubSettings dataCatalogSettings = dataCatalogSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataCatalogStubSettings 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 PagedCallSettings< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse> + searchCatalogSettings; + private final UnaryCallSettings createEntryGroupSettings; + private final UnaryCallSettings getEntryGroupSettings; + private final UnaryCallSettings updateEntryGroupSettings; + private final UnaryCallSettings deleteEntryGroupSettings; + private final PagedCallSettings< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings; + private final UnaryCallSettings createEntrySettings; + private final UnaryCallSettings updateEntrySettings; + private final UnaryCallSettings deleteEntrySettings; + private final UnaryCallSettings getEntrySettings; + private final UnaryCallSettings lookupEntrySettings; + private final PagedCallSettings + listEntriesSettings; + private final UnaryCallSettings createTagTemplateSettings; + private final UnaryCallSettings getTagTemplateSettings; + private final UnaryCallSettings updateTagTemplateSettings; + private final UnaryCallSettings deleteTagTemplateSettings; + private final UnaryCallSettings + createTagTemplateFieldSettings; + private final UnaryCallSettings + updateTagTemplateFieldSettings; + private final UnaryCallSettings + renameTagTemplateFieldSettings; + private final UnaryCallSettings + deleteTagTemplateFieldSettings; + private final UnaryCallSettings createTagSettings; + private final UnaryCallSettings updateTagSettings; + private final UnaryCallSettings deleteTagSettings; + private final PagedCallSettings + listTagsSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + /** Returns the object with the settings used for calls to searchCatalog. */ + public PagedCallSettings + searchCatalogSettings() { + return searchCatalogSettings; + } + + /** Returns the object with the settings used for calls to createEntryGroup. */ + public UnaryCallSettings createEntryGroupSettings() { + return createEntryGroupSettings; + } + + /** Returns the object with the settings used for calls to getEntryGroup. */ + public UnaryCallSettings getEntryGroupSettings() { + return getEntryGroupSettings; + } + + /** Returns the object with the settings used for calls to updateEntryGroup. */ + public UnaryCallSettings updateEntryGroupSettings() { + return updateEntryGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteEntryGroup. */ + public UnaryCallSettings deleteEntryGroupSettings() { + return deleteEntryGroupSettings; + } + + /** Returns the object with the settings used for calls to listEntryGroups. */ + public PagedCallSettings< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings() { + return listEntryGroupsSettings; + } + + /** Returns the object with the settings used for calls to createEntry. */ + public UnaryCallSettings createEntrySettings() { + return createEntrySettings; + } + + /** Returns the object with the settings used for calls to updateEntry. */ + public UnaryCallSettings updateEntrySettings() { + return updateEntrySettings; + } + + /** Returns the object with the settings used for calls to deleteEntry. */ + public UnaryCallSettings deleteEntrySettings() { + return deleteEntrySettings; + } + + /** Returns the object with the settings used for calls to getEntry. */ + public UnaryCallSettings getEntrySettings() { + return getEntrySettings; + } + + /** Returns the object with the settings used for calls to lookupEntry. */ + public UnaryCallSettings lookupEntrySettings() { + return lookupEntrySettings; + } + + /** Returns the object with the settings used for calls to listEntries. */ + public PagedCallSettings + listEntriesSettings() { + return listEntriesSettings; + } + + /** Returns the object with the settings used for calls to createTagTemplate. */ + public UnaryCallSettings createTagTemplateSettings() { + return createTagTemplateSettings; + } + + /** Returns the object with the settings used for calls to getTagTemplate. */ + public UnaryCallSettings getTagTemplateSettings() { + return getTagTemplateSettings; + } + + /** Returns the object with the settings used for calls to updateTagTemplate. */ + public UnaryCallSettings updateTagTemplateSettings() { + return updateTagTemplateSettings; + } + + /** Returns the object with the settings used for calls to deleteTagTemplate. */ + public UnaryCallSettings deleteTagTemplateSettings() { + return deleteTagTemplateSettings; + } + + /** Returns the object with the settings used for calls to createTagTemplateField. */ + public UnaryCallSettings + createTagTemplateFieldSettings() { + return createTagTemplateFieldSettings; + } + + /** Returns the object with the settings used for calls to updateTagTemplateField. */ + public UnaryCallSettings + updateTagTemplateFieldSettings() { + return updateTagTemplateFieldSettings; + } + + /** Returns the object with the settings used for calls to renameTagTemplateField. */ + public UnaryCallSettings + renameTagTemplateFieldSettings() { + return renameTagTemplateFieldSettings; + } + + /** Returns the object with the settings used for calls to deleteTagTemplateField. */ + public UnaryCallSettings deleteTagTemplateFieldSettings() { + return deleteTagTemplateFieldSettings; + } + + /** Returns the object with the settings used for calls to createTag. */ + public UnaryCallSettings createTagSettings() { + return createTagSettings; + } + + /** Returns the object with the settings used for calls to updateTag. */ + public UnaryCallSettings updateTagSettings() { + return updateTagSettings; + } + + /** Returns the object with the settings used for calls to deleteTag. */ + public UnaryCallSettings deleteTagSettings() { + return deleteTagSettings; + } + + /** Returns the object with the settings used for calls to listTags. */ + public PagedCallSettings + listTagsSettings() { + return listTagsSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataCatalogStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataCatalogStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + 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 "datacatalog.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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + 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 defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataCatalogStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataCatalogStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchCatalogSettings = settingsBuilder.searchCatalogSettings().build(); + createEntryGroupSettings = settingsBuilder.createEntryGroupSettings().build(); + getEntryGroupSettings = settingsBuilder.getEntryGroupSettings().build(); + updateEntryGroupSettings = settingsBuilder.updateEntryGroupSettings().build(); + deleteEntryGroupSettings = settingsBuilder.deleteEntryGroupSettings().build(); + listEntryGroupsSettings = settingsBuilder.listEntryGroupsSettings().build(); + createEntrySettings = settingsBuilder.createEntrySettings().build(); + updateEntrySettings = settingsBuilder.updateEntrySettings().build(); + deleteEntrySettings = settingsBuilder.deleteEntrySettings().build(); + getEntrySettings = settingsBuilder.getEntrySettings().build(); + lookupEntrySettings = settingsBuilder.lookupEntrySettings().build(); + listEntriesSettings = settingsBuilder.listEntriesSettings().build(); + createTagTemplateSettings = settingsBuilder.createTagTemplateSettings().build(); + getTagTemplateSettings = settingsBuilder.getTagTemplateSettings().build(); + updateTagTemplateSettings = settingsBuilder.updateTagTemplateSettings().build(); + deleteTagTemplateSettings = settingsBuilder.deleteTagTemplateSettings().build(); + createTagTemplateFieldSettings = settingsBuilder.createTagTemplateFieldSettings().build(); + updateTagTemplateFieldSettings = settingsBuilder.updateTagTemplateFieldSettings().build(); + renameTagTemplateFieldSettings = settingsBuilder.renameTagTemplateFieldSettings().build(); + deleteTagTemplateFieldSettings = settingsBuilder.deleteTagTemplateFieldSettings().build(); + createTagSettings = settingsBuilder.createTagSettings().build(); + updateTagSettings = settingsBuilder.updateTagSettings().build(); + deleteTagSettings = settingsBuilder.deleteTagSettings().build(); + listTagsSettings = settingsBuilder.listTagsSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + private static final PagedListDescriptor< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> + SEARCH_CATALOG_PAGE_STR_DESC = + new PagedListDescriptor< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchCatalogRequest injectToken(SearchCatalogRequest payload, String token) { + return SearchCatalogRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchCatalogRequest injectPageSize(SearchCatalogRequest payload, int pageSize) { + return SearchCatalogRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchCatalogRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchCatalogResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchCatalogResponse payload) { + return payload.getResultsList() != null + ? payload.getResultsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> + LIST_ENTRY_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEntryGroupsRequest injectToken( + ListEntryGroupsRequest payload, String token) { + return ListEntryGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEntryGroupsRequest injectPageSize( + ListEntryGroupsRequest payload, int pageSize) { + return ListEntryGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEntryGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEntryGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEntryGroupsResponse payload) { + return payload.getEntryGroupsList() != null + ? payload.getEntryGroupsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_ENTRIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEntriesRequest injectToken(ListEntriesRequest payload, String token) { + return ListEntriesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEntriesRequest injectPageSize(ListEntriesRequest payload, int pageSize) { + return ListEntriesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEntriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEntriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEntriesResponse payload) { + return payload.getEntriesList() != null + ? payload.getEntriesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_TAGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTagsRequest injectToken(ListTagsRequest payload, String token) { + return ListTagsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTagsRequest injectPageSize(ListTagsRequest payload, int pageSize) { + return ListTagsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTagsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTagsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTagsResponse payload) { + return payload.getTagsList() != null + ? payload.getTagsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse> + SEARCH_CATALOG_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchCatalogRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create(callable, SEARCH_CATALOG_PAGE_STR_DESC, request, context); + return SearchCatalogPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + LIST_ENTRY_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEntryGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ENTRY_GROUPS_PAGE_STR_DESC, request, context); + return ListEntryGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEntriesRequest, ListEntriesResponse, ListEntriesPagedResponse> + LIST_ENTRIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEntriesRequest, ListEntriesResponse, ListEntriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEntriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ENTRIES_PAGE_STR_DESC, request, context); + return ListEntriesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTagsRequest, ListTagsResponse, ListTagsPagedResponse> + LIST_TAGS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTagsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TAGS_PAGE_STR_DESC, request, context); + return ListTagsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for DataCatalogStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final PagedCallSettings.Builder< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse> + searchCatalogSettings; + private final UnaryCallSettings.Builder + createEntryGroupSettings; + private final UnaryCallSettings.Builder getEntryGroupSettings; + private final UnaryCallSettings.Builder + updateEntryGroupSettings; + private final UnaryCallSettings.Builder + deleteEntryGroupSettings; + private final PagedCallSettings.Builder< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings; + private final UnaryCallSettings.Builder createEntrySettings; + private final UnaryCallSettings.Builder updateEntrySettings; + private final UnaryCallSettings.Builder deleteEntrySettings; + private final UnaryCallSettings.Builder getEntrySettings; + private final UnaryCallSettings.Builder lookupEntrySettings; + private final PagedCallSettings.Builder< + ListEntriesRequest, ListEntriesResponse, ListEntriesPagedResponse> + listEntriesSettings; + private final UnaryCallSettings.Builder + createTagTemplateSettings; + private final UnaryCallSettings.Builder + getTagTemplateSettings; + private final UnaryCallSettings.Builder + updateTagTemplateSettings; + private final UnaryCallSettings.Builder + deleteTagTemplateSettings; + private final UnaryCallSettings.Builder + createTagTemplateFieldSettings; + private final UnaryCallSettings.Builder + updateTagTemplateFieldSettings; + private final UnaryCallSettings.Builder + renameTagTemplateFieldSettings; + private final UnaryCallSettings.Builder + deleteTagTemplateFieldSettings; + private final UnaryCallSettings.Builder createTagSettings; + private final UnaryCallSettings.Builder updateTagSettings; + private final UnaryCallSettings.Builder deleteTagSettings; + private final PagedCallSettings.Builder< + ListTagsRequest, ListTagsResponse, ListTagsPagedResponse> + listTagsSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", 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(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchCatalogSettings = PagedCallSettings.newBuilder(SEARCH_CATALOG_PAGE_STR_FACT); + + createEntryGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getEntryGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateEntryGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteEntryGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listEntryGroupsSettings = PagedCallSettings.newBuilder(LIST_ENTRY_GROUPS_PAGE_STR_FACT); + + createEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + lookupEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listEntriesSettings = PagedCallSettings.newBuilder(LIST_ENTRIES_PAGE_STR_FACT); + + createTagTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getTagTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateTagTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTagTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createTagTemplateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateTagTemplateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + renameTagTemplateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTagTemplateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listTagsSettings = PagedCallSettings.newBuilder(LIST_TAGS_PAGE_STR_FACT); + + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + searchCatalogSettings, + createEntryGroupSettings, + getEntryGroupSettings, + updateEntryGroupSettings, + deleteEntryGroupSettings, + listEntryGroupsSettings, + createEntrySettings, + updateEntrySettings, + deleteEntrySettings, + getEntrySettings, + lookupEntrySettings, + listEntriesSettings, + createTagTemplateSettings, + getTagTemplateSettings, + updateTagTemplateSettings, + deleteTagTemplateSettings, + createTagTemplateFieldSettings, + updateTagTemplateFieldSettings, + renameTagTemplateFieldSettings, + deleteTagTemplateFieldSettings, + createTagSettings, + updateTagSettings, + deleteTagSettings, + listTagsSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .searchCatalogSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createEntryGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getEntryGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateEntryGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteEntryGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listEntryGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .lookupEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createTagTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getTagTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateTagTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTagTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createTagTemplateFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateTagTemplateFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .renameTagTemplateFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTagTemplateFieldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listTagsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(DataCatalogStubSettings settings) { + super(settings); + + searchCatalogSettings = settings.searchCatalogSettings.toBuilder(); + createEntryGroupSettings = settings.createEntryGroupSettings.toBuilder(); + getEntryGroupSettings = settings.getEntryGroupSettings.toBuilder(); + updateEntryGroupSettings = settings.updateEntryGroupSettings.toBuilder(); + deleteEntryGroupSettings = settings.deleteEntryGroupSettings.toBuilder(); + listEntryGroupsSettings = settings.listEntryGroupsSettings.toBuilder(); + createEntrySettings = settings.createEntrySettings.toBuilder(); + updateEntrySettings = settings.updateEntrySettings.toBuilder(); + deleteEntrySettings = settings.deleteEntrySettings.toBuilder(); + getEntrySettings = settings.getEntrySettings.toBuilder(); + lookupEntrySettings = settings.lookupEntrySettings.toBuilder(); + listEntriesSettings = settings.listEntriesSettings.toBuilder(); + createTagTemplateSettings = settings.createTagTemplateSettings.toBuilder(); + getTagTemplateSettings = settings.getTagTemplateSettings.toBuilder(); + updateTagTemplateSettings = settings.updateTagTemplateSettings.toBuilder(); + deleteTagTemplateSettings = settings.deleteTagTemplateSettings.toBuilder(); + createTagTemplateFieldSettings = settings.createTagTemplateFieldSettings.toBuilder(); + updateTagTemplateFieldSettings = settings.updateTagTemplateFieldSettings.toBuilder(); + renameTagTemplateFieldSettings = settings.renameTagTemplateFieldSettings.toBuilder(); + deleteTagTemplateFieldSettings = settings.deleteTagTemplateFieldSettings.toBuilder(); + createTagSettings = settings.createTagSettings.toBuilder(); + updateTagSettings = settings.updateTagSettings.toBuilder(); + deleteTagSettings = settings.deleteTagSettings.toBuilder(); + listTagsSettings = settings.listTagsSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + searchCatalogSettings, + createEntryGroupSettings, + getEntryGroupSettings, + updateEntryGroupSettings, + deleteEntryGroupSettings, + listEntryGroupsSettings, + createEntrySettings, + updateEntrySettings, + deleteEntrySettings, + getEntrySettings, + lookupEntrySettings, + listEntriesSettings, + createTagTemplateSettings, + getTagTemplateSettings, + updateTagTemplateSettings, + deleteTagTemplateSettings, + createTagTemplateFieldSettings, + updateTagTemplateFieldSettings, + renameTagTemplateFieldSettings, + deleteTagTemplateFieldSettings, + createTagSettings, + updateTagSettings, + deleteTagSettings, + listTagsSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to searchCatalog. */ + public PagedCallSettings.Builder< + SearchCatalogRequest, SearchCatalogResponse, SearchCatalogPagedResponse> + searchCatalogSettings() { + return searchCatalogSettings; + } + + /** Returns the builder for the settings used for calls to createEntryGroup. */ + public UnaryCallSettings.Builder + createEntryGroupSettings() { + return createEntryGroupSettings; + } + + /** Returns the builder for the settings used for calls to getEntryGroup. */ + public UnaryCallSettings.Builder getEntryGroupSettings() { + return getEntryGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateEntryGroup. */ + public UnaryCallSettings.Builder + updateEntryGroupSettings() { + return updateEntryGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteEntryGroup. */ + public UnaryCallSettings.Builder deleteEntryGroupSettings() { + return deleteEntryGroupSettings; + } + + /** Returns the builder for the settings used for calls to listEntryGroups. */ + public PagedCallSettings.Builder< + ListEntryGroupsRequest, ListEntryGroupsResponse, ListEntryGroupsPagedResponse> + listEntryGroupsSettings() { + return listEntryGroupsSettings; + } + + /** Returns the builder for the settings used for calls to createEntry. */ + public UnaryCallSettings.Builder createEntrySettings() { + return createEntrySettings; + } + + /** Returns the builder for the settings used for calls to updateEntry. */ + public UnaryCallSettings.Builder updateEntrySettings() { + return updateEntrySettings; + } + + /** Returns the builder for the settings used for calls to deleteEntry. */ + public UnaryCallSettings.Builder deleteEntrySettings() { + return deleteEntrySettings; + } + + /** Returns the builder for the settings used for calls to getEntry. */ + public UnaryCallSettings.Builder getEntrySettings() { + return getEntrySettings; + } + + /** Returns the builder for the settings used for calls to lookupEntry. */ + public UnaryCallSettings.Builder lookupEntrySettings() { + return lookupEntrySettings; + } + + /** Returns the builder for the settings used for calls to listEntries. */ + public PagedCallSettings.Builder< + ListEntriesRequest, ListEntriesResponse, ListEntriesPagedResponse> + listEntriesSettings() { + return listEntriesSettings; + } + + /** Returns the builder for the settings used for calls to createTagTemplate. */ + public UnaryCallSettings.Builder + createTagTemplateSettings() { + return createTagTemplateSettings; + } + + /** Returns the builder for the settings used for calls to getTagTemplate. */ + public UnaryCallSettings.Builder getTagTemplateSettings() { + return getTagTemplateSettings; + } + + /** Returns the builder for the settings used for calls to updateTagTemplate. */ + public UnaryCallSettings.Builder + updateTagTemplateSettings() { + return updateTagTemplateSettings; + } + + /** Returns the builder for the settings used for calls to deleteTagTemplate. */ + public UnaryCallSettings.Builder deleteTagTemplateSettings() { + return deleteTagTemplateSettings; + } + + /** Returns the builder for the settings used for calls to createTagTemplateField. */ + public UnaryCallSettings.Builder + createTagTemplateFieldSettings() { + return createTagTemplateFieldSettings; + } + + /** Returns the builder for the settings used for calls to updateTagTemplateField. */ + public UnaryCallSettings.Builder + updateTagTemplateFieldSettings() { + return updateTagTemplateFieldSettings; + } + + /** Returns the builder for the settings used for calls to renameTagTemplateField. */ + public UnaryCallSettings.Builder + renameTagTemplateFieldSettings() { + return renameTagTemplateFieldSettings; + } + + /** Returns the builder for the settings used for calls to deleteTagTemplateField. */ + public UnaryCallSettings.Builder + deleteTagTemplateFieldSettings() { + return deleteTagTemplateFieldSettings; + } + + /** Returns the builder for the settings used for calls to createTag. */ + public UnaryCallSettings.Builder createTagSettings() { + return createTagSettings; + } + + /** Returns the builder for the settings used for calls to updateTag. */ + public UnaryCallSettings.Builder updateTagSettings() { + return updateTagSettings; + } + + /** Returns the builder for the settings used for calls to deleteTag. */ + public UnaryCallSettings.Builder deleteTagSettings() { + return deleteTagSettings; + } + + /** Returns the builder for the settings used for calls to listTags. */ + public PagedCallSettings.Builder + listTagsSettings() { + return listTagsSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataCatalogStubSettings build() throws IOException { + return new DataCatalogStubSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogCallableFactory.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogCallableFactory.java new file mode 100644 index 00000000..3a91feec --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1.stub; + +import com.google.api.core.BetaApi; +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.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Google Cloud Data Catalog API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcDataCatalogCallableFactory 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 pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java new file mode 100644 index 00000000..3197bb3f --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java @@ -0,0 +1,1008 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntriesPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntryGroupsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse; + +import com.google.api.core.BetaApi; +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.CreateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.CreateEntryRequest; +import com.google.cloud.datacatalog.v1.CreateTagRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.CreateTagTemplateRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest; +import com.google.cloud.datacatalog.v1.DeleteEntryRequest; +import com.google.cloud.datacatalog.v1.DeleteTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest; +import com.google.cloud.datacatalog.v1.Entry; +import com.google.cloud.datacatalog.v1.EntryGroup; +import com.google.cloud.datacatalog.v1.GetEntryGroupRequest; +import com.google.cloud.datacatalog.v1.GetEntryRequest; +import com.google.cloud.datacatalog.v1.GetTagTemplateRequest; +import com.google.cloud.datacatalog.v1.ListEntriesRequest; +import com.google.cloud.datacatalog.v1.ListEntriesResponse; +import com.google.cloud.datacatalog.v1.ListEntryGroupsRequest; +import com.google.cloud.datacatalog.v1.ListEntryGroupsResponse; +import com.google.cloud.datacatalog.v1.ListTagsRequest; +import com.google.cloud.datacatalog.v1.ListTagsResponse; +import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogRequest; +import com.google.cloud.datacatalog.v1.SearchCatalogResponse; +import com.google.cloud.datacatalog.v1.Tag; +import com.google.cloud.datacatalog.v1.TagTemplate; +import com.google.cloud.datacatalog.v1.TagTemplateField; +import com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest; +import com.google.cloud.datacatalog.v1.UpdateEntryRequest; +import com.google.cloud.datacatalog.v1.UpdateTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; +import com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 Google Cloud Data Catalog API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcDataCatalogStub extends DataCatalogStub { + + private static final MethodDescriptor + searchCatalogMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/SearchCatalog") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchCatalogRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchCatalogResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createEntryGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/CreateEntryGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEntryGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EntryGroup.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getEntryGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/GetEntryGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEntryGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EntryGroup.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateEntryGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/UpdateEntryGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateEntryGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(EntryGroup.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteEntryGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/DeleteEntryGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEntryGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listEntryGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/ListEntryGroups") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEntryGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntryGroupsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor createEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/CreateEntry") + .setRequestMarshaller(ProtoUtils.marshaller(CreateEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/UpdateEntry") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/DeleteEntry") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor getEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/GetEntry") + .setRequestMarshaller(ProtoUtils.marshaller(GetEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) + .build(); + private static final MethodDescriptor lookupEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/LookupEntry") + .setRequestMarshaller(ProtoUtils.marshaller(LookupEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listEntriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/ListEntries") + .setRequestMarshaller(ProtoUtils.marshaller(ListEntriesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntriesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createTagTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTagTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getTagTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/GetTagTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTagTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateTagTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTagTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplate.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteTagTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTagTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createTagTemplateFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/CreateTagTemplateField") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTagTemplateFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplateField.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateTagTemplateFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/UpdateTagTemplateField") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTagTemplateFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplateField.getDefaultInstance())) + .build(); + private static final MethodDescriptor + renameTagTemplateFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateField") + .setRequestMarshaller( + ProtoUtils.marshaller(RenameTagTemplateFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplateField.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteTagTemplateFieldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/DeleteTagTemplateField") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTagTemplateFieldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor createTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/CreateTag") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tag.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/UpdateTag") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tag.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/DeleteTag") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTagsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/ListTags") + .setRequestMarshaller(ProtoUtils.marshaller(ListTagsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListTagsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.DataCatalog/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable searchCatalogCallable; + private final UnaryCallable + searchCatalogPagedCallable; + private final UnaryCallable createEntryGroupCallable; + private final UnaryCallable getEntryGroupCallable; + private final UnaryCallable updateEntryGroupCallable; + private final UnaryCallable deleteEntryGroupCallable; + private final UnaryCallable + listEntryGroupsCallable; + private final UnaryCallable + listEntryGroupsPagedCallable; + private final UnaryCallable createEntryCallable; + private final UnaryCallable updateEntryCallable; + private final UnaryCallable deleteEntryCallable; + private final UnaryCallable getEntryCallable; + private final UnaryCallable lookupEntryCallable; + private final UnaryCallable listEntriesCallable; + private final UnaryCallable + listEntriesPagedCallable; + private final UnaryCallable createTagTemplateCallable; + private final UnaryCallable getTagTemplateCallable; + private final UnaryCallable updateTagTemplateCallable; + private final UnaryCallable deleteTagTemplateCallable; + private final UnaryCallable + createTagTemplateFieldCallable; + private final UnaryCallable + updateTagTemplateFieldCallable; + private final UnaryCallable + renameTagTemplateFieldCallable; + private final UnaryCallable deleteTagTemplateFieldCallable; + private final UnaryCallable createTagCallable; + private final UnaryCallable updateTagCallable; + private final UnaryCallable deleteTagCallable; + private final UnaryCallable listTagsCallable; + private final UnaryCallable listTagsPagedCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataCatalogStub create(DataCatalogStubSettings settings) + throws IOException { + return new GrpcDataCatalogStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataCatalogStub create(ClientContext clientContext) throws IOException { + return new GrpcDataCatalogStub(DataCatalogStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataCatalogStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataCatalogStub( + DataCatalogStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataCatalogStub, 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 GrpcDataCatalogStub(DataCatalogStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataCatalogCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataCatalogStub, 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 GrpcDataCatalogStub( + DataCatalogStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings searchCatalogTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchCatalogMethodDescriptor) + .build(); + GrpcCallSettings createEntryGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEntryGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEntryGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEntryGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEntryGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEntryGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateEntryGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEntryGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEntryGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "entry_group.name", String.valueOf(request.getEntryGroup().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteEntryGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEntryGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEntryGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listEntryGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEntryGroupsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEntryGroupsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEntryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEntryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEntryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEntryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("entry.name", String.valueOf(request.getEntry().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEntryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEntryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEntryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEntryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings lookupEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(lookupEntryMethodDescriptor) + .build(); + GrpcCallSettings listEntriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEntriesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEntriesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createTagTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTagTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTagTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTagTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTagTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTagTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTagTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTagTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTagTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "tag_template.name", String.valueOf(request.getTagTemplate().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTagTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTagTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTagTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createTagTemplateFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTagTemplateFieldMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTagTemplateFieldRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateTagTemplateFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTagTemplateFieldMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTagTemplateFieldRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + renameTagTemplateFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(renameTagTemplateFieldMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RenameTagTemplateFieldRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTagTemplateFieldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTagTemplateFieldMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTagTemplateFieldRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("tag.name", String.valueOf(request.getTag().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listTagsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTagsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTagsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + + this.searchCatalogCallable = + callableFactory.createUnaryCallable( + searchCatalogTransportSettings, settings.searchCatalogSettings(), clientContext); + this.searchCatalogPagedCallable = + callableFactory.createPagedCallable( + searchCatalogTransportSettings, settings.searchCatalogSettings(), clientContext); + this.createEntryGroupCallable = + callableFactory.createUnaryCallable( + createEntryGroupTransportSettings, settings.createEntryGroupSettings(), clientContext); + this.getEntryGroupCallable = + callableFactory.createUnaryCallable( + getEntryGroupTransportSettings, settings.getEntryGroupSettings(), clientContext); + this.updateEntryGroupCallable = + callableFactory.createUnaryCallable( + updateEntryGroupTransportSettings, settings.updateEntryGroupSettings(), clientContext); + this.deleteEntryGroupCallable = + callableFactory.createUnaryCallable( + deleteEntryGroupTransportSettings, settings.deleteEntryGroupSettings(), clientContext); + this.listEntryGroupsCallable = + callableFactory.createUnaryCallable( + listEntryGroupsTransportSettings, settings.listEntryGroupsSettings(), clientContext); + this.listEntryGroupsPagedCallable = + callableFactory.createPagedCallable( + listEntryGroupsTransportSettings, settings.listEntryGroupsSettings(), clientContext); + this.createEntryCallable = + callableFactory.createUnaryCallable( + createEntryTransportSettings, settings.createEntrySettings(), clientContext); + this.updateEntryCallable = + callableFactory.createUnaryCallable( + updateEntryTransportSettings, settings.updateEntrySettings(), clientContext); + this.deleteEntryCallable = + callableFactory.createUnaryCallable( + deleteEntryTransportSettings, settings.deleteEntrySettings(), clientContext); + this.getEntryCallable = + callableFactory.createUnaryCallable( + getEntryTransportSettings, settings.getEntrySettings(), clientContext); + this.lookupEntryCallable = + callableFactory.createUnaryCallable( + lookupEntryTransportSettings, settings.lookupEntrySettings(), clientContext); + this.listEntriesCallable = + callableFactory.createUnaryCallable( + listEntriesTransportSettings, settings.listEntriesSettings(), clientContext); + this.listEntriesPagedCallable = + callableFactory.createPagedCallable( + listEntriesTransportSettings, settings.listEntriesSettings(), clientContext); + this.createTagTemplateCallable = + callableFactory.createUnaryCallable( + createTagTemplateTransportSettings, + settings.createTagTemplateSettings(), + clientContext); + this.getTagTemplateCallable = + callableFactory.createUnaryCallable( + getTagTemplateTransportSettings, settings.getTagTemplateSettings(), clientContext); + this.updateTagTemplateCallable = + callableFactory.createUnaryCallable( + updateTagTemplateTransportSettings, + settings.updateTagTemplateSettings(), + clientContext); + this.deleteTagTemplateCallable = + callableFactory.createUnaryCallable( + deleteTagTemplateTransportSettings, + settings.deleteTagTemplateSettings(), + clientContext); + this.createTagTemplateFieldCallable = + callableFactory.createUnaryCallable( + createTagTemplateFieldTransportSettings, + settings.createTagTemplateFieldSettings(), + clientContext); + this.updateTagTemplateFieldCallable = + callableFactory.createUnaryCallable( + updateTagTemplateFieldTransportSettings, + settings.updateTagTemplateFieldSettings(), + clientContext); + this.renameTagTemplateFieldCallable = + callableFactory.createUnaryCallable( + renameTagTemplateFieldTransportSettings, + settings.renameTagTemplateFieldSettings(), + clientContext); + this.deleteTagTemplateFieldCallable = + callableFactory.createUnaryCallable( + deleteTagTemplateFieldTransportSettings, + settings.deleteTagTemplateFieldSettings(), + clientContext); + this.createTagCallable = + callableFactory.createUnaryCallable( + createTagTransportSettings, settings.createTagSettings(), clientContext); + this.updateTagCallable = + callableFactory.createUnaryCallable( + updateTagTransportSettings, settings.updateTagSettings(), clientContext); + this.deleteTagCallable = + callableFactory.createUnaryCallable( + deleteTagTransportSettings, settings.deleteTagSettings(), clientContext); + this.listTagsCallable = + callableFactory.createUnaryCallable( + listTagsTransportSettings, settings.listTagsSettings(), clientContext); + this.listTagsPagedCallable = + callableFactory.createPagedCallable( + listTagsTransportSettings, settings.listTagsSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable + searchCatalogPagedCallable() { + return searchCatalogPagedCallable; + } + + public UnaryCallable searchCatalogCallable() { + return searchCatalogCallable; + } + + public UnaryCallable createEntryGroupCallable() { + return createEntryGroupCallable; + } + + public UnaryCallable getEntryGroupCallable() { + return getEntryGroupCallable; + } + + public UnaryCallable updateEntryGroupCallable() { + return updateEntryGroupCallable; + } + + public UnaryCallable deleteEntryGroupCallable() { + return deleteEntryGroupCallable; + } + + public UnaryCallable + listEntryGroupsPagedCallable() { + return listEntryGroupsPagedCallable; + } + + public UnaryCallable listEntryGroupsCallable() { + return listEntryGroupsCallable; + } + + public UnaryCallable createEntryCallable() { + return createEntryCallable; + } + + public UnaryCallable updateEntryCallable() { + return updateEntryCallable; + } + + public UnaryCallable deleteEntryCallable() { + return deleteEntryCallable; + } + + public UnaryCallable getEntryCallable() { + return getEntryCallable; + } + + public UnaryCallable lookupEntryCallable() { + return lookupEntryCallable; + } + + public UnaryCallable listEntriesPagedCallable() { + return listEntriesPagedCallable; + } + + public UnaryCallable listEntriesCallable() { + return listEntriesCallable; + } + + public UnaryCallable createTagTemplateCallable() { + return createTagTemplateCallable; + } + + public UnaryCallable getTagTemplateCallable() { + return getTagTemplateCallable; + } + + public UnaryCallable updateTagTemplateCallable() { + return updateTagTemplateCallable; + } + + public UnaryCallable deleteTagTemplateCallable() { + return deleteTagTemplateCallable; + } + + public UnaryCallable + createTagTemplateFieldCallable() { + return createTagTemplateFieldCallable; + } + + public UnaryCallable + updateTagTemplateFieldCallable() { + return updateTagTemplateFieldCallable; + } + + public UnaryCallable + renameTagTemplateFieldCallable() { + return renameTagTemplateFieldCallable; + } + + public UnaryCallable deleteTagTemplateFieldCallable() { + return deleteTagTemplateFieldCallable; + } + + public UnaryCallable createTagCallable() { + return createTagCallable; + } + + public UnaryCallable updateTagCallable() { + return updateTagCallable; + } + + public UnaryCallable deleteTagCallable() { + return deleteTagCallable; + } + + public UnaryCallable listTagsPagedCallable() { + return listTagsPagedCallable; + } + + public UnaryCallable listTagsCallable() { + return listTagsCallable; + } + + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java new file mode 100644 index 00000000..e2656aaa --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java @@ -0,0 +1,1671 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1; + +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntriesPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListEntryGroupsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.ListTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse; + +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.api.resourcenames.ResourceName; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class DataCatalogClientTest { + private static MockDataCatalog mockDataCatalog; + private static MockServiceHelper serviceHelper; + private DataCatalogClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDataCatalog = new MockDataCatalog(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataCatalog)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + DataCatalogSettings settings = + DataCatalogSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataCatalogClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void searchCatalogTest() { + String nextPageToken = ""; + SearchCatalogResult resultsElement = SearchCatalogResult.newBuilder().build(); + List results = Arrays.asList(resultsElement); + SearchCatalogResponse expectedResponse = + SearchCatalogResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllResults(results) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build(); + String query = "query107944136"; + + SearchCatalogPagedResponse pagedListResponse = client.searchCatalog(scope, query); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchCatalogRequest actualRequest = (SearchCatalogRequest) actualRequests.get(0); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void searchCatalogExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build(); + String query = "query107944136"; + + client.searchCatalog(scope, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createEntryGroupTest() { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + EntryGroup expectedResponse = + EntryGroup.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String entryGroupId = "entryGroupId-43122680"; + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + EntryGroup actualResponse = client.createEntryGroup(parent, entryGroupId, entryGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEntryGroupRequest actualRequest = (CreateEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(entryGroupId, actualRequest.getEntryGroupId()); + Assert.assertEquals(entryGroup, actualRequest.getEntryGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createEntryGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String entryGroupId = "entryGroupId-43122680"; + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + client.createEntryGroup(parent, entryGroupId, entryGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getEntryGroupTest() { + EntryGroupName name2 = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + EntryGroup expectedResponse = + EntryGroup.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + EntryGroup actualResponse = client.getEntryGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntryGroupRequest actualRequest = (GetEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryGroupName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getEntryGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + client.getEntryGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getEntryGroupTest2() { + EntryGroupName name2 = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + EntryGroup expectedResponse = + EntryGroup.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + FieldMask readMask = FieldMask.newBuilder().build(); + + EntryGroup actualResponse = client.getEntryGroup(name, readMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntryGroupRequest actualRequest = (GetEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryGroupName.parse(actualRequest.getName())); + Assert.assertEquals(readMask, actualRequest.getReadMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getEntryGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + FieldMask readMask = FieldMask.newBuilder().build(); + + client.getEntryGroup(name, readMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateEntryGroupTest() { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + EntryGroup expectedResponse = + EntryGroup.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + EntryGroup actualResponse = client.updateEntryGroup(entryGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEntryGroupRequest actualRequest = (UpdateEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(entryGroup, actualRequest.getEntryGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateEntryGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + client.updateEntryGroup(entryGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateEntryGroupTest2() { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + EntryGroup expectedResponse = + EntryGroup.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + EntryGroup actualResponse = client.updateEntryGroup(entryGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEntryGroupRequest actualRequest = (UpdateEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(entryGroup, actualRequest.getEntryGroup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateEntryGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroup entryGroup = EntryGroup.newBuilder().build(); + + client.updateEntryGroup(entryGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteEntryGroupTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + client.deleteEntryGroup(name); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEntryGroupRequest actualRequest = (DeleteEntryGroupRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryGroupName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteEntryGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + client.deleteEntryGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listEntryGroupsTest() { + String nextPageToken = ""; + EntryGroup entryGroupsElement = EntryGroup.newBuilder().build(); + List entryGroups = Arrays.asList(entryGroupsElement); + ListEntryGroupsResponse expectedResponse = + ListEntryGroupsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllEntryGroups(entryGroups) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + ListEntryGroupsPagedResponse pagedListResponse = client.listEntryGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntryGroupsList().get(0), resources.get(0)); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntryGroupsRequest actualRequest = (ListEntryGroupsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntryGroupName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listEntryGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + client.listEntryGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createEntryTest() { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + String linkedResource = "linkedResource1544625012"; + String userSpecifiedType = "userSpecifiedType-940364963"; + String userSpecifiedSystem = "userSpecifiedSystem-1776119406"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Entry expectedResponse = + Entry.newBuilder() + .setName(name.toString()) + .setLinkedResource(linkedResource) + .setUserSpecifiedType(userSpecifiedType) + .setUserSpecifiedSystem(userSpecifiedSystem) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String entryId = "entryId-2093663224"; + Entry entry = Entry.newBuilder().build(); + + Entry actualResponse = client.createEntry(parent, entryId, entry); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEntryRequest actualRequest = (CreateEntryRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntryGroupName.parse(actualRequest.getParent())); + Assert.assertEquals(entryId, actualRequest.getEntryId()); + Assert.assertEquals(entry, actualRequest.getEntry()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + String entryId = "entryId-2093663224"; + Entry entry = Entry.newBuilder().build(); + + client.createEntry(parent, entryId, entry); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateEntryTest() { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + String linkedResource = "linkedResource1544625012"; + String userSpecifiedType = "userSpecifiedType-940364963"; + String userSpecifiedSystem = "userSpecifiedSystem-1776119406"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Entry expectedResponse = + Entry.newBuilder() + .setName(name.toString()) + .setLinkedResource(linkedResource) + .setUserSpecifiedType(userSpecifiedType) + .setUserSpecifiedSystem(userSpecifiedSystem) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + Entry entry = Entry.newBuilder().build(); + + Entry actualResponse = client.updateEntry(entry); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEntryRequest actualRequest = (UpdateEntryRequest) actualRequests.get(0); + + Assert.assertEquals(entry, actualRequest.getEntry()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + Entry entry = Entry.newBuilder().build(); + + client.updateEntry(entry); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateEntryTest2() { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + String linkedResource = "linkedResource1544625012"; + String userSpecifiedType = "userSpecifiedType-940364963"; + String userSpecifiedSystem = "userSpecifiedSystem-1776119406"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Entry expectedResponse = + Entry.newBuilder() + .setName(name.toString()) + .setLinkedResource(linkedResource) + .setUserSpecifiedType(userSpecifiedType) + .setUserSpecifiedSystem(userSpecifiedSystem) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + Entry entry = Entry.newBuilder().build(); + + Entry actualResponse = client.updateEntry(entry); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEntryRequest actualRequest = (UpdateEntryRequest) actualRequests.get(0); + + Assert.assertEquals(entry, actualRequest.getEntry()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateEntryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + Entry entry = Entry.newBuilder().build(); + + client.updateEntry(entry); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteEntryTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.deleteEntry(name); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEntryRequest actualRequest = (DeleteEntryRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.deleteEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getEntryTest() { + EntryName name2 = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + String linkedResource = "linkedResource1544625012"; + String userSpecifiedType = "userSpecifiedType-940364963"; + String userSpecifiedSystem = "userSpecifiedSystem-1776119406"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Entry expectedResponse = + Entry.newBuilder() + .setName(name2.toString()) + .setLinkedResource(linkedResource) + .setUserSpecifiedType(userSpecifiedType) + .setUserSpecifiedSystem(userSpecifiedSystem) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + Entry actualResponse = client.getEntry(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntryRequest actualRequest = (GetEntryRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.getEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void lookupEntryTest() { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + String linkedResource = "linkedResource1544625012"; + String userSpecifiedType = "userSpecifiedType-940364963"; + String userSpecifiedSystem = "userSpecifiedSystem-1776119406"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Entry expectedResponse = + Entry.newBuilder() + .setName(name.toString()) + .setLinkedResource(linkedResource) + .setUserSpecifiedType(userSpecifiedType) + .setUserSpecifiedSystem(userSpecifiedSystem) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + LookupEntryRequest request = LookupEntryRequest.newBuilder().build(); + + Entry actualResponse = client.lookupEntry(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LookupEntryRequest actualRequest = (LookupEntryRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void lookupEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + LookupEntryRequest request = LookupEntryRequest.newBuilder().build(); + + client.lookupEntry(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listEntriesTest() { + String nextPageToken = ""; + Entry entriesElement = Entry.newBuilder().build(); + List entries = Arrays.asList(entriesElement); + ListEntriesResponse expectedResponse = + ListEntriesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllEntries(entries) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + ListEntriesPagedResponse pagedListResponse = client.listEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0)); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntriesRequest actualRequest = (ListEntriesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntryGroupName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listEntriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"); + + client.listEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createTagTemplateTest() { + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String displayName = "displayName1615086568"; + TagTemplate expectedResponse = + TagTemplate.newBuilder().setName(name.toString()).setDisplayName(displayName).build(); + mockDataCatalog.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String tagTemplateId = "tagTemplateId-2020335141"; + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + TagTemplate actualResponse = client.createTagTemplate(parent, tagTemplateId, tagTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTagTemplateRequest actualRequest = (CreateTagTemplateRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(tagTemplateId, actualRequest.getTagTemplateId()); + Assert.assertEquals(tagTemplate, actualRequest.getTagTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTagTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String tagTemplateId = "tagTemplateId-2020335141"; + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + client.createTagTemplate(parent, tagTemplateId, tagTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getTagTemplateTest() { + TagTemplateName name2 = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String displayName = "displayName1615086568"; + TagTemplate expectedResponse = + TagTemplate.newBuilder().setName(name2.toString()).setDisplayName(displayName).build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + + TagTemplate actualResponse = client.getTagTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTagTemplateRequest actualRequest = (GetTagTemplateRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getTagTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + + client.getTagTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateTest() { + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String displayName = "displayName1615086568"; + TagTemplate expectedResponse = + TagTemplate.newBuilder().setName(name.toString()).setDisplayName(displayName).build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + TagTemplate actualResponse = client.updateTagTemplate(tagTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagTemplateRequest actualRequest = (UpdateTagTemplateRequest) actualRequests.get(0); + + Assert.assertEquals(tagTemplate, actualRequest.getTagTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + client.updateTagTemplate(tagTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateTest2() { + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String displayName = "displayName1615086568"; + TagTemplate expectedResponse = + TagTemplate.newBuilder().setName(name.toString()).setDisplayName(displayName).build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + TagTemplate actualResponse = client.updateTagTemplate(tagTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagTemplateRequest actualRequest = (UpdateTagTemplateRequest) actualRequests.get(0); + + Assert.assertEquals(tagTemplate, actualRequest.getTagTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplate tagTemplate = TagTemplate.newBuilder().build(); + + client.updateTagTemplate(tagTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTagTemplateTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + boolean force = false; + + client.deleteTagTemplate(name, force); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTagTemplateRequest actualRequest = (DeleteTagTemplateRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateName.parse(actualRequest.getName())); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTagTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + boolean force = false; + + client.deleteTagTemplate(name, force); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createTagTemplateFieldTest() { + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String displayName = "displayName1615086568"; + boolean isRequired = true; + int order = 106006350; + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setIsRequired(isRequired) + .setOrder(order) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String tagTemplateFieldId = "tagTemplateFieldId-92144832"; + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + + TagTemplateField actualResponse = + client.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTagTemplateFieldRequest actualRequest = + (CreateTagTemplateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TagTemplateName.parse(actualRequest.getParent())); + Assert.assertEquals(tagTemplateFieldId, actualRequest.getTagTemplateFieldId()); + Assert.assertEquals(tagTemplateField, actualRequest.getTagTemplateField()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTagTemplateFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + String tagTemplateFieldId = "tagTemplateFieldId-92144832"; + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + + client.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateFieldTest() { + TagTemplateFieldName name2 = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String displayName = "displayName1615086568"; + boolean isRequired = true; + int order = 106006350; + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setIsRequired(isRequired) + .setOrder(order) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + + TagTemplateField actualResponse = client.updateTagTemplateField(name, tagTemplateField); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagTemplateFieldRequest actualRequest = + (UpdateTagTemplateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateFieldName.parse(actualRequest.getName())); + Assert.assertEquals(tagTemplateField, actualRequest.getTagTemplateField()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + + client.updateTagTemplateField(name, tagTemplateField); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateFieldTest2() { + TagTemplateFieldName name2 = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String displayName = "displayName1615086568"; + boolean isRequired = true; + int order = 106006350; + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setIsRequired(isRequired) + .setOrder(order) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TagTemplateField actualResponse = + client.updateTagTemplateField(name, tagTemplateField, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagTemplateFieldRequest actualRequest = + (UpdateTagTemplateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateFieldName.parse(actualRequest.getName())); + Assert.assertEquals(tagTemplateField, actualRequest.getTagTemplateField()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagTemplateFieldExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateTagTemplateField(name, tagTemplateField, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void renameTagTemplateFieldTest() { + TagTemplateFieldName name2 = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String displayName = "displayName1615086568"; + boolean isRequired = true; + int order = 106006350; + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setIsRequired(isRequired) + .setOrder(order) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String newTagTemplateFieldId = "newTagTemplateFieldId-1668354591"; + + TagTemplateField actualResponse = client.renameTagTemplateField(name, newTagTemplateFieldId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RenameTagTemplateFieldRequest actualRequest = + (RenameTagTemplateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateFieldName.parse(actualRequest.getName())); + Assert.assertEquals(newTagTemplateFieldId, actualRequest.getNewTagTemplateFieldId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void renameTagTemplateFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + String newTagTemplateFieldId = "newTagTemplateFieldId-1668354591"; + + client.renameTagTemplateField(name, newTagTemplateFieldId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTagTemplateFieldTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + boolean force = false; + + client.deleteTagTemplateField(name, force); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTagTemplateFieldRequest actualRequest = + (DeleteTagTemplateFieldRequest) actualRequests.get(0); + + Assert.assertEquals(name, TagTemplateFieldName.parse(actualRequest.getName())); + Assert.assertEquals(force, actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTagTemplateFieldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateFieldName name = + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]"); + boolean force = false; + + client.deleteTagTemplateField(name, force); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createTagTest() { + TagName name = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]"); + String template = "template-1321546630"; + String templateDisplayName = "templateDisplayName-532252787"; + String column = "column-1354837162"; + Tag expectedResponse = + Tag.newBuilder() + .setName(name.toString()) + .setTemplate(template) + .setTemplateDisplayName(templateDisplayName) + .setColumn(column) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]"); + Tag tag = Tag.newBuilder().build(); + + Tag actualResponse = client.createTag(parent, tag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTagRequest actualRequest = (CreateTagRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TagName.parse(actualRequest.getParent())); + Assert.assertEquals(tag, actualRequest.getTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]"); + Tag tag = Tag.newBuilder().build(); + + client.createTag(parent, tag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTest() { + TagName name = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]"); + String template = "template-1321546630"; + String templateDisplayName = "templateDisplayName-532252787"; + String column = "column-1354837162"; + Tag expectedResponse = + Tag.newBuilder() + .setName(name.toString()) + .setTemplate(template) + .setTemplateDisplayName(templateDisplayName) + .setColumn(column) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + Tag tag = Tag.newBuilder().build(); + + Tag actualResponse = client.updateTag(tag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagRequest actualRequest = (UpdateTagRequest) actualRequests.get(0); + + Assert.assertEquals(tag, actualRequest.getTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + Tag tag = Tag.newBuilder().build(); + + client.updateTag(tag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTagTest2() { + TagName name = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]"); + String template = "template-1321546630"; + String templateDisplayName = "templateDisplayName-532252787"; + String column = "column-1354837162"; + Tag expectedResponse = + Tag.newBuilder() + .setName(name.toString()) + .setTemplate(template) + .setTemplateDisplayName(templateDisplayName) + .setColumn(column) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + Tag tag = Tag.newBuilder().build(); + + Tag actualResponse = client.updateTag(tag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTagRequest actualRequest = (UpdateTagRequest) actualRequests.get(0); + + Assert.assertEquals(tag, actualRequest.getTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTagExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + Tag tag = Tag.newBuilder().build(); + + client.updateTag(tag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTagTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.deleteTag(name); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTagRequest actualRequest = (DeleteTagRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntryName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.deleteTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTagsTest() { + String nextPageToken = ""; + Tag tagsElement = Tag.newBuilder().build(); + List tags = Arrays.asList(tagsElement); + ListTagsResponse expectedResponse = + ListTagsResponse.newBuilder().setNextPageToken(nextPageToken).addAllTags(tags).build(); + mockDataCatalog.addResponse(expectedResponse); + + EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + ListTagsPagedResponse pagedListResponse = client.listTags(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTagsList().get(0), resources.get(0)); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTagsRequest actualRequest = (ListTagsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntryName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTagsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + + client.listTags(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void setIamPolicyTest() { + int version = 351608024; + ByteString etag = ByteString.copyFromUtf8("21"); + Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build(); + mockDataCatalog.addResponse(expectedResponse); + + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + Policy policy = Policy.newBuilder().build(); + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource.toString()).setPolicy(policy).build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = (SetIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + Policy policy = Policy.newBuilder().build(); + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource.toString()) + .setPolicy(policy) + .build(); + + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getIamPolicyTest() { + int version = 351608024; + ByteString etag = ByteString.copyFromUtf8("21"); + Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build(); + mockDataCatalog.addResponse(expectedResponse); + + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder().setResource(resource.toString()).build(); + + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void testIamPermissionsTest() { + TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build(); + mockDataCatalog.addResponse(expectedResponse); + + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + List permissions = new ArrayList<>(); + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource.toString()) + .addAllPermissions(permissions) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertEquals(permissions, actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]"); + List permissions = new ArrayList<>(); + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource.toString()) + .addAllPermissions(permissions) + .build(); + + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalog.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalog.java new file mode 100644 index 00000000..8227d6d9 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalog.java @@ -0,0 +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. + */ +package com.google.cloud.datacatalog.v1; + +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; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataCatalog implements MockGrpcService { + private final MockDataCatalogImpl serviceImpl; + + public MockDataCatalog() { + serviceImpl = new MockDataCatalogImpl(); + } + + @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/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java new file mode 100644 index 00000000..8eca4b10 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java @@ -0,0 +1,459 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datacatalog.v1.DataCatalogGrpc.DataCatalogImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataCatalogImpl extends DataCatalogImplBase { + private List requests; + private Queue responses; + + public MockDataCatalogImpl() { + 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 searchCatalog( + SearchCatalogRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SearchCatalogResponse) { + requests.add(request); + responseObserver.onNext((SearchCatalogResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createEntryGroup( + CreateEntryGroupRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof EntryGroup) { + requests.add(request); + responseObserver.onNext((EntryGroup) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getEntryGroup( + GetEntryGroupRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof EntryGroup) { + requests.add(request); + responseObserver.onNext((EntryGroup) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateEntryGroup( + UpdateEntryGroupRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof EntryGroup) { + requests.add(request); + responseObserver.onNext((EntryGroup) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteEntryGroup( + DeleteEntryGroupRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void listEntryGroups( + ListEntryGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEntryGroupsResponse) { + requests.add(request); + responseObserver.onNext((ListEntryGroupsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createEntry(CreateEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entry) { + requests.add(request); + responseObserver.onNext((Entry) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateEntry(UpdateEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entry) { + requests.add(request); + responseObserver.onNext((Entry) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteEntry(DeleteEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void getEntry(GetEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entry) { + requests.add(request); + responseObserver.onNext((Entry) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void lookupEntry(LookupEntryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entry) { + requests.add(request); + responseObserver.onNext((Entry) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listEntries( + ListEntriesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEntriesResponse) { + requests.add(request); + responseObserver.onNext((ListEntriesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createTagTemplate( + CreateTagTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplate) { + requests.add(request); + responseObserver.onNext((TagTemplate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getTagTemplate( + GetTagTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplate) { + requests.add(request); + responseObserver.onNext((TagTemplate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateTagTemplate( + UpdateTagTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplate) { + requests.add(request); + responseObserver.onNext((TagTemplate) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTagTemplate( + DeleteTagTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void createTagTemplateField( + CreateTagTemplateFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplateField) { + requests.add(request); + responseObserver.onNext((TagTemplateField) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateTagTemplateField( + UpdateTagTemplateFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplateField) { + requests.add(request); + responseObserver.onNext((TagTemplateField) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void renameTagTemplateField( + RenameTagTemplateFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TagTemplateField) { + requests.add(request); + responseObserver.onNext((TagTemplateField) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTagTemplateField( + DeleteTagTemplateFieldRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void createTag(CreateTagRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Tag) { + requests.add(request); + responseObserver.onNext((Tag) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateTag(UpdateTagRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Tag) { + requests.add(request); + responseObserver.onNext((Tag) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTag(DeleteTagRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void listTags(ListTagsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTagsResponse) { + requests.add(request); + responseObserver.onNext((ListTagsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext((Policy) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext((Policy) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext((TestIamPermissionsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-datacatalog-v1/pom.xml b/grpc-google-cloud-datacatalog-v1/pom.xml new file mode 100644 index 00000000..c8309389 --- /dev/null +++ b/grpc-google-cloud-datacatalog-v1/pom.xml @@ -0,0 +1,60 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + grpc-google-cloud-datacatalog-v1 + GRPC library for grpc-google-cloud-datacatalog-v1 + + com.google.cloud + google-cloud-datacatalog-parent + 0.33.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-datacatalog-v1 + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java new file mode 100644 index 00000000..46d2ff94 --- /dev/null +++ b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java @@ -0,0 +1,3755 @@ +/* + * 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. + */ +package com.google.cloud.datacatalog.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Data Catalog API service allows clients to discover, understand, and manage
+ * their data.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datacatalog/v1/datacatalog.proto") +public final class DataCatalogGrpc { + + private DataCatalogGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datacatalog.v1.DataCatalog"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.SearchCatalogRequest, + com.google.cloud.datacatalog.v1.SearchCatalogResponse> + getSearchCatalogMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchCatalog", + requestType = com.google.cloud.datacatalog.v1.SearchCatalogRequest.class, + responseType = com.google.cloud.datacatalog.v1.SearchCatalogResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.SearchCatalogRequest, + com.google.cloud.datacatalog.v1.SearchCatalogResponse> + getSearchCatalogMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.SearchCatalogRequest, + com.google.cloud.datacatalog.v1.SearchCatalogResponse> + getSearchCatalogMethod; + if ((getSearchCatalogMethod = DataCatalogGrpc.getSearchCatalogMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getSearchCatalogMethod = DataCatalogGrpc.getSearchCatalogMethod) == null) { + DataCatalogGrpc.getSearchCatalogMethod = + getSearchCatalogMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchCatalog")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.SearchCatalogRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.SearchCatalogResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("SearchCatalog")) + .build(); + } + } + } + return getSearchCatalogMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getCreateEntryGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEntryGroup", + requestType = com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.class, + responseType = com.google.cloud.datacatalog.v1.EntryGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getCreateEntryGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getCreateEntryGroupMethod; + if ((getCreateEntryGroupMethod = DataCatalogGrpc.getCreateEntryGroupMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getCreateEntryGroupMethod = DataCatalogGrpc.getCreateEntryGroupMethod) == null) { + DataCatalogGrpc.getCreateEntryGroupMethod = + getCreateEntryGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEntryGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("CreateEntryGroup")) + .build(); + } + } + } + return getCreateEntryGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getGetEntryGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEntryGroup", + requestType = com.google.cloud.datacatalog.v1.GetEntryGroupRequest.class, + responseType = com.google.cloud.datacatalog.v1.EntryGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getGetEntryGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getGetEntryGroupMethod; + if ((getGetEntryGroupMethod = DataCatalogGrpc.getGetEntryGroupMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getGetEntryGroupMethod = DataCatalogGrpc.getGetEntryGroupMethod) == null) { + DataCatalogGrpc.getGetEntryGroupMethod = + getGetEntryGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEntryGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("GetEntryGroup")) + .build(); + } + } + } + return getGetEntryGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getUpdateEntryGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEntryGroup", + requestType = com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.class, + responseType = com.google.cloud.datacatalog.v1.EntryGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getUpdateEntryGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup> + getUpdateEntryGroupMethod; + if ((getUpdateEntryGroupMethod = DataCatalogGrpc.getUpdateEntryGroupMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getUpdateEntryGroupMethod = DataCatalogGrpc.getUpdateEntryGroupMethod) == null) { + DataCatalogGrpc.getUpdateEntryGroupMethod = + getUpdateEntryGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEntryGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("UpdateEntryGroup")) + .build(); + } + } + } + return getUpdateEntryGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest, com.google.protobuf.Empty> + getDeleteEntryGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEntryGroup", + requestType = com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest, com.google.protobuf.Empty> + getDeleteEntryGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest, com.google.protobuf.Empty> + getDeleteEntryGroupMethod; + if ((getDeleteEntryGroupMethod = DataCatalogGrpc.getDeleteEntryGroupMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getDeleteEntryGroupMethod = DataCatalogGrpc.getDeleteEntryGroupMethod) == null) { + DataCatalogGrpc.getDeleteEntryGroupMethod = + getDeleteEntryGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEntryGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("DeleteEntryGroup")) + .build(); + } + } + } + return getDeleteEntryGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse> + getListEntryGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntryGroups", + requestType = com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.class, + responseType = com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse> + getListEntryGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse> + getListEntryGroupsMethod; + if ((getListEntryGroupsMethod = DataCatalogGrpc.getListEntryGroupsMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getListEntryGroupsMethod = DataCatalogGrpc.getListEntryGroupsMethod) == null) { + DataCatalogGrpc.getListEntryGroupsMethod = + getListEntryGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntryGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("ListEntryGroups")) + .build(); + } + } + } + return getListEntryGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getCreateEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEntry", + requestType = com.google.cloud.datacatalog.v1.CreateEntryRequest.class, + responseType = com.google.cloud.datacatalog.v1.Entry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getCreateEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateEntryRequest, + com.google.cloud.datacatalog.v1.Entry> + getCreateEntryMethod; + if ((getCreateEntryMethod = DataCatalogGrpc.getCreateEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getCreateEntryMethod = DataCatalogGrpc.getCreateEntryMethod) == null) { + DataCatalogGrpc.getCreateEntryMethod = + getCreateEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateEntryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Entry.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("CreateEntry")) + .build(); + } + } + } + return getCreateEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getUpdateEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEntry", + requestType = com.google.cloud.datacatalog.v1.UpdateEntryRequest.class, + responseType = com.google.cloud.datacatalog.v1.Entry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getUpdateEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateEntryRequest, + com.google.cloud.datacatalog.v1.Entry> + getUpdateEntryMethod; + if ((getUpdateEntryMethod = DataCatalogGrpc.getUpdateEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getUpdateEntryMethod = DataCatalogGrpc.getUpdateEntryMethod) == null) { + DataCatalogGrpc.getUpdateEntryMethod = + getUpdateEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateEntryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Entry.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("UpdateEntry")) + .build(); + } + } + } + return getUpdateEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryRequest, com.google.protobuf.Empty> + getDeleteEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEntry", + requestType = com.google.cloud.datacatalog.v1.DeleteEntryRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryRequest, com.google.protobuf.Empty> + getDeleteEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteEntryRequest, com.google.protobuf.Empty> + getDeleteEntryMethod; + if ((getDeleteEntryMethod = DataCatalogGrpc.getDeleteEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getDeleteEntryMethod = DataCatalogGrpc.getDeleteEntryMethod) == null) { + DataCatalogGrpc.getDeleteEntryMethod = + getDeleteEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteEntryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("DeleteEntry")) + .build(); + } + } + } + return getDeleteEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getGetEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEntry", + requestType = com.google.cloud.datacatalog.v1.GetEntryRequest.class, + responseType = com.google.cloud.datacatalog.v1.Entry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getGetEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getGetEntryMethod; + if ((getGetEntryMethod = DataCatalogGrpc.getGetEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getGetEntryMethod = DataCatalogGrpc.getGetEntryMethod) == null) { + DataCatalogGrpc.getGetEntryMethod = + getGetEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.GetEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Entry.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("GetEntry")) + .build(); + } + } + } + return getGetEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.LookupEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getLookupEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupEntry", + requestType = com.google.cloud.datacatalog.v1.LookupEntryRequest.class, + responseType = com.google.cloud.datacatalog.v1.Entry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.LookupEntryRequest, com.google.cloud.datacatalog.v1.Entry> + getLookupEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.LookupEntryRequest, + com.google.cloud.datacatalog.v1.Entry> + getLookupEntryMethod; + if ((getLookupEntryMethod = DataCatalogGrpc.getLookupEntryMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getLookupEntryMethod = DataCatalogGrpc.getLookupEntryMethod) == null) { + DataCatalogGrpc.getLookupEntryMethod = + getLookupEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.LookupEntryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Entry.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("LookupEntry")) + .build(); + } + } + } + return getLookupEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntriesRequest, + com.google.cloud.datacatalog.v1.ListEntriesResponse> + getListEntriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntries", + requestType = com.google.cloud.datacatalog.v1.ListEntriesRequest.class, + responseType = com.google.cloud.datacatalog.v1.ListEntriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntriesRequest, + com.google.cloud.datacatalog.v1.ListEntriesResponse> + getListEntriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListEntriesRequest, + com.google.cloud.datacatalog.v1.ListEntriesResponse> + getListEntriesMethod; + if ((getListEntriesMethod = DataCatalogGrpc.getListEntriesMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getListEntriesMethod = DataCatalogGrpc.getListEntriesMethod) == null) { + DataCatalogGrpc.getListEntriesMethod = + getListEntriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListEntriesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListEntriesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("ListEntries")) + .build(); + } + } + } + return getListEntriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getCreateTagTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTagTemplate", + requestType = com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getCreateTagTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getCreateTagTemplateMethod; + if ((getCreateTagTemplateMethod = DataCatalogGrpc.getCreateTagTemplateMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getCreateTagTemplateMethod = DataCatalogGrpc.getCreateTagTemplateMethod) == null) { + DataCatalogGrpc.getCreateTagTemplateMethod = + getCreateTagTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTagTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("CreateTagTemplate")) + .build(); + } + } + } + return getCreateTagTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getGetTagTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTagTemplate", + requestType = com.google.cloud.datacatalog.v1.GetTagTemplateRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getGetTagTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getGetTagTemplateMethod; + if ((getGetTagTemplateMethod = DataCatalogGrpc.getGetTagTemplateMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getGetTagTemplateMethod = DataCatalogGrpc.getGetTagTemplateMethod) == null) { + DataCatalogGrpc.getGetTagTemplateMethod = + getGetTagTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTagTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("GetTagTemplate")) + .build(); + } + } + } + return getGetTagTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getUpdateTagTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTagTemplate", + requestType = com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getUpdateTagTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate> + getUpdateTagTemplateMethod; + if ((getUpdateTagTemplateMethod = DataCatalogGrpc.getUpdateTagTemplateMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getUpdateTagTemplateMethod = DataCatalogGrpc.getUpdateTagTemplateMethod) == null) { + DataCatalogGrpc.getUpdateTagTemplateMethod = + getUpdateTagTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTagTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("UpdateTagTemplate")) + .build(); + } + } + } + return getUpdateTagTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest, com.google.protobuf.Empty> + getDeleteTagTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTagTemplate", + requestType = com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest, com.google.protobuf.Empty> + getDeleteTagTemplateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest, com.google.protobuf.Empty> + getDeleteTagTemplateMethod; + if ((getDeleteTagTemplateMethod = DataCatalogGrpc.getDeleteTagTemplateMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getDeleteTagTemplateMethod = DataCatalogGrpc.getDeleteTagTemplateMethod) == null) { + DataCatalogGrpc.getDeleteTagTemplateMethod = + getDeleteTagTemplateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTagTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("DeleteTagTemplate")) + .build(); + } + } + } + return getDeleteTagTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getCreateTagTemplateFieldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTagTemplateField", + requestType = com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplateField.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getCreateTagTemplateFieldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getCreateTagTemplateFieldMethod; + if ((getCreateTagTemplateFieldMethod = DataCatalogGrpc.getCreateTagTemplateFieldMethod) + == null) { + synchronized (DataCatalogGrpc.class) { + if ((getCreateTagTemplateFieldMethod = DataCatalogGrpc.getCreateTagTemplateFieldMethod) + == null) { + DataCatalogGrpc.getCreateTagTemplateFieldMethod = + getCreateTagTemplateFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateTagTemplateField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplateField + .getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("CreateTagTemplateField")) + .build(); + } + } + } + return getCreateTagTemplateFieldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getUpdateTagTemplateFieldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTagTemplateField", + requestType = com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplateField.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getUpdateTagTemplateFieldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getUpdateTagTemplateFieldMethod; + if ((getUpdateTagTemplateFieldMethod = DataCatalogGrpc.getUpdateTagTemplateFieldMethod) + == null) { + synchronized (DataCatalogGrpc.class) { + if ((getUpdateTagTemplateFieldMethod = DataCatalogGrpc.getUpdateTagTemplateFieldMethod) + == null) { + DataCatalogGrpc.getUpdateTagTemplateFieldMethod = + getUpdateTagTemplateFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateTagTemplateField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplateField + .getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("UpdateTagTemplateField")) + .build(); + } + } + } + return getUpdateTagTemplateFieldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RenameTagTemplateField", + requestType = com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplateField.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldMethod; + if ((getRenameTagTemplateFieldMethod = DataCatalogGrpc.getRenameTagTemplateFieldMethod) + == null) { + synchronized (DataCatalogGrpc.class) { + if ((getRenameTagTemplateFieldMethod = DataCatalogGrpc.getRenameTagTemplateFieldMethod) + == null) { + DataCatalogGrpc.getRenameTagTemplateFieldMethod = + getRenameTagTemplateFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RenameTagTemplateField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplateField + .getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("RenameTagTemplateField")) + .build(); + } + } + } + return getRenameTagTemplateFieldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, com.google.protobuf.Empty> + getDeleteTagTemplateFieldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTagTemplateField", + requestType = com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, com.google.protobuf.Empty> + getDeleteTagTemplateFieldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, + com.google.protobuf.Empty> + getDeleteTagTemplateFieldMethod; + if ((getDeleteTagTemplateFieldMethod = DataCatalogGrpc.getDeleteTagTemplateFieldMethod) + == null) { + synchronized (DataCatalogGrpc.class) { + if ((getDeleteTagTemplateFieldMethod = DataCatalogGrpc.getDeleteTagTemplateFieldMethod) + == null) { + DataCatalogGrpc.getDeleteTagTemplateFieldMethod = + getDeleteTagTemplateFieldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteTagTemplateField")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("DeleteTagTemplateField")) + .build(); + } + } + } + return getDeleteTagTemplateFieldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getCreateTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTag", + requestType = com.google.cloud.datacatalog.v1.CreateTagRequest.class, + responseType = com.google.cloud.datacatalog.v1.Tag.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getCreateTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getCreateTagMethod; + if ((getCreateTagMethod = DataCatalogGrpc.getCreateTagMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getCreateTagMethod = DataCatalogGrpc.getCreateTagMethod) == null) { + DataCatalogGrpc.getCreateTagMethod = + getCreateTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Tag.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("CreateTag")) + .build(); + } + } + } + return getCreateTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getUpdateTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTag", + requestType = com.google.cloud.datacatalog.v1.UpdateTagRequest.class, + responseType = com.google.cloud.datacatalog.v1.Tag.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getUpdateTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTagRequest, com.google.cloud.datacatalog.v1.Tag> + getUpdateTagMethod; + if ((getUpdateTagMethod = DataCatalogGrpc.getUpdateTagMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getUpdateTagMethod = DataCatalogGrpc.getUpdateTagMethod) == null) { + DataCatalogGrpc.getUpdateTagMethod = + getUpdateTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Tag.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("UpdateTag")) + .build(); + } + } + } + return getUpdateTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagRequest, com.google.protobuf.Empty> + getDeleteTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTag", + requestType = com.google.cloud.datacatalog.v1.DeleteTagRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagRequest, com.google.protobuf.Empty> + getDeleteTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTagRequest, com.google.protobuf.Empty> + getDeleteTagMethod; + if ((getDeleteTagMethod = DataCatalogGrpc.getDeleteTagMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getDeleteTagMethod = DataCatalogGrpc.getDeleteTagMethod) == null) { + DataCatalogGrpc.getDeleteTagMethod = + getDeleteTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("DeleteTag")) + .build(); + } + } + } + return getDeleteTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTagsRequest, + com.google.cloud.datacatalog.v1.ListTagsResponse> + getListTagsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTags", + requestType = com.google.cloud.datacatalog.v1.ListTagsRequest.class, + responseType = com.google.cloud.datacatalog.v1.ListTagsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTagsRequest, + com.google.cloud.datacatalog.v1.ListTagsResponse> + getListTagsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTagsRequest, + com.google.cloud.datacatalog.v1.ListTagsResponse> + getListTagsMethod; + if ((getListTagsMethod = DataCatalogGrpc.getListTagsMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getListTagsMethod = DataCatalogGrpc.getListTagsMethod) == null) { + DataCatalogGrpc.getListTagsMethod = + getListTagsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTags")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListTagsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListTagsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("ListTags")) + .build(); + } + } + } + return getListTagsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = DataCatalogGrpc.getSetIamPolicyMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getSetIamPolicyMethod = DataCatalogGrpc.getSetIamPolicyMethod) == null) { + DataCatalogGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = DataCatalogGrpc.getGetIamPolicyMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getGetIamPolicyMethod = DataCatalogGrpc.getGetIamPolicyMethod) == null) { + DataCatalogGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new DataCatalogMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", + requestType = com.google.iam.v1.TestIamPermissionsRequest.class, + responseType = com.google.iam.v1.TestIamPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + if ((getTestIamPermissionsMethod = DataCatalogGrpc.getTestIamPermissionsMethod) == null) { + synchronized (DataCatalogGrpc.class) { + if ((getTestIamPermissionsMethod = DataCatalogGrpc.getTestIamPermissionsMethod) == null) { + DataCatalogGrpc.getTestIamPermissionsMethod = + getTestIamPermissionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier("TestIamPermissions")) + .build(); + } + } + } + return getTestIamPermissionsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataCatalogStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataCatalogStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogStub(channel, callOptions); + } + }; + return DataCatalogStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataCatalogBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataCatalogBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogBlockingStub(channel, callOptions); + } + }; + return DataCatalogBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataCatalogFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataCatalogFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogFutureStub(channel, callOptions); + } + }; + return DataCatalogFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Data Catalog API service allows clients to discover, understand, and manage
+   * their data.
+   * 
+ */ + public abstract static class DataCatalogImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Searches Data Catalog for multiple resources like entries, tags that
+     * match a query.
+     * This is a custom method
+     * (https://cloud.google.com/apis/design/custom_methods) and does not return
+     * the complete resource, only the resource identifier and high level
+     * fields. Clients can subsequentally call `Get` methods.
+     * Note that Data Catalog search queries do not guarantee full recall. Query
+     * results that match your query may not be returned, even in subsequent
+     * result pages. Also note that results returned (and not returned) can vary
+     * across repeated search queries.
+     * See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ */ + public void searchCatalog( + com.google.cloud.datacatalog.v1.SearchCatalogRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getSearchCatalogMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an EntryGroup.
+     * An entry group contains logically related entries together with Cloud
+     * Identity and Access Management policies that specify the users who can
+     * create, edit, and view entries within the entry group.
+     * Data Catalog automatically creates an entry group for BigQuery entries
+     * ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry
+     * group to contain Cloud Storage fileset entries or custom type entries,
+     * and the IAM policies associated with those entries. Entry groups, like
+     * entries, can be searched.
+     * A maximum of 10,000 entry groups may be created per organization across all
+     * locations.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void createEntryGroup( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateEntryGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an EntryGroup.
+     * 
+ */ + public void getEntryGroup( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetEntryGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an EntryGroup. The user should enable the Data Catalog API in the
+     * project identified by the `entry_group.name` parameter (see [Data Catalog
+     * Resource Project] (/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void updateEntryGroup( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateEntryGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an EntryGroup. Only entry groups that do not contain entries can be
+     * deleted. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteEntryGroup( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteEntryGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists entry groups.
+     * 
+ */ + public void listEntryGroups( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEntryGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
+     * be created.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * A maximum of 100,000 entries may be created per entry group.
+     * 
+ */ + public void createEntry( + com.google.cloud.datacatalog.v1.CreateEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an existing entry.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `entry.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateEntry( + com.google.cloud.datacatalog.v1.UpdateEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing entry. Only entries created through
+     * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]
+     * method can be deleted.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteEntry( + com.google.cloud.datacatalog.v1.DeleteEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an entry.
+     * 
+ */ + public void getEntry( + com.google.cloud.datacatalog.v1.GetEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Data Catalog Entry.
+     * 
+ */ + public void lookupEntry( + com.google.cloud.datacatalog.v1.LookupEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLookupEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists entries.
+     * 
+ */ + public void listEntries( + com.google.cloud.datacatalog.v1.ListEntriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEntriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a tag template. The user should enable the Data Catalog API in
+     * the project identified by the `parent` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void createTagTemplate( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateTagTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a tag template.
+     * 
+ */ + public void getTagTemplate( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTagTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a tag template. This method cannot be used to update the fields of
+     * a template. The tag template fields are represented as separate resources
+     * and should be updated using their own create/update/delete methods.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `tag_template.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateTagTemplate( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTagTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a tag template and all tags using the template.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteTagTemplate( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTagTemplateMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `parent` parameter (see
+     * [Data Catalog Resource
+     * Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void createTagTemplateField( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateTagTemplateFieldMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a field in a tag template. This method cannot be used to update the
+     * field type. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateTagTemplateField( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTagTemplateFieldMethod(), responseObserver); + } + + /** + * + * + *
+     * Renames a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `name` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void renameTagTemplateField( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getRenameTagTemplateFieldMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a field in a tag template and all uses of that field.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteTagTemplateField( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTagTemplateFieldMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * Note: The project identified by the `parent` parameter for the
+     * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)
+     * and the
+     * [tag
+     * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)
+     * used to create the tag must be from the same organization.
+     * 
+ */ + public void createTag( + com.google.cloud.datacatalog.v1.CreateTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateTagMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an existing tag.
+     * 
+ */ + public void updateTag( + com.google.cloud.datacatalog.v1.UpdateTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTagMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a tag.
+     * 
+ */ + public void deleteTag( + com.google.cloud.datacatalog.v1.DeleteTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTagMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * 
+ */ + public void listTags( + com.google.cloud.datacatalog.v1.ListTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTagsMethod(), responseObserver); + } + + /** + * + * + *
+     * Sets the access control policy for a resource. Replaces any existing
+     * policy.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
+     *     templates.
+     *   - `datacatalog.entries.setIamPolicy` to set policies on entries.
+     *   - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+     * 
+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy for a resource. A `NOT_FOUND` error
+     * is returned if the resource does not exist. An empty policy is returned
+     * if the resource exists but does not have a policy set on it.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
+     *     templates.
+     *   - `datacatalog.entries.getIamPolicy` to get policies on entries.
+     *   - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+     * 
+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the caller's permissions on a resource.
+     * If the resource does not exist, an empty set of permissions is returned
+     * (We don't return a `NOT_FOUND` error).
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * A caller is not required to have Google IAM permission to make this
+     * request.
+     * 
+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getTestIamPermissionsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSearchCatalogMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.SearchCatalogRequest, + com.google.cloud.datacatalog.v1.SearchCatalogResponse>( + this, METHODID_SEARCH_CATALOG))) + .addMethod( + getCreateEntryGroupMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup>( + this, METHODID_CREATE_ENTRY_GROUP))) + .addMethod( + getGetEntryGroupMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.GetEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup>(this, METHODID_GET_ENTRY_GROUP))) + .addMethod( + getUpdateEntryGroupMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest, + com.google.cloud.datacatalog.v1.EntryGroup>( + this, METHODID_UPDATE_ENTRY_GROUP))) + .addMethod( + getDeleteEntryGroupMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ENTRY_GROUP))) + .addMethod( + getListEntryGroupsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse>( + this, METHODID_LIST_ENTRY_GROUPS))) + .addMethod( + getCreateEntryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateEntryRequest, + com.google.cloud.datacatalog.v1.Entry>(this, METHODID_CREATE_ENTRY))) + .addMethod( + getUpdateEntryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateEntryRequest, + com.google.cloud.datacatalog.v1.Entry>(this, METHODID_UPDATE_ENTRY))) + .addMethod( + getDeleteEntryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteEntryRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ENTRY))) + .addMethod( + getGetEntryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.GetEntryRequest, + com.google.cloud.datacatalog.v1.Entry>(this, METHODID_GET_ENTRY))) + .addMethod( + getLookupEntryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.LookupEntryRequest, + com.google.cloud.datacatalog.v1.Entry>(this, METHODID_LOOKUP_ENTRY))) + .addMethod( + getListEntriesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ListEntriesRequest, + com.google.cloud.datacatalog.v1.ListEntriesResponse>( + this, METHODID_LIST_ENTRIES))) + .addMethod( + getCreateTagTemplateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate>( + this, METHODID_CREATE_TAG_TEMPLATE))) + .addMethod( + getGetTagTemplateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.GetTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate>( + this, METHODID_GET_TAG_TEMPLATE))) + .addMethod( + getUpdateTagTemplateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest, + com.google.cloud.datacatalog.v1.TagTemplate>( + this, METHODID_UPDATE_TAG_TEMPLATE))) + .addMethod( + getDeleteTagTemplateMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_TAG_TEMPLATE))) + .addMethod( + getCreateTagTemplateFieldMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField>( + this, METHODID_CREATE_TAG_TEMPLATE_FIELD))) + .addMethod( + getUpdateTagTemplateFieldMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField>( + this, METHODID_UPDATE_TAG_TEMPLATE_FIELD))) + .addMethod( + getRenameTagTemplateFieldMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, + com.google.cloud.datacatalog.v1.TagTemplateField>( + this, METHODID_RENAME_TAG_TEMPLATE_FIELD))) + .addMethod( + getDeleteTagTemplateFieldMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_TAG_TEMPLATE_FIELD))) + .addMethod( + getCreateTagMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateTagRequest, + com.google.cloud.datacatalog.v1.Tag>(this, METHODID_CREATE_TAG))) + .addMethod( + getUpdateTagMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateTagRequest, + com.google.cloud.datacatalog.v1.Tag>(this, METHODID_UPDATE_TAG))) + .addMethod( + getDeleteTagMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteTagRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_TAG))) + .addMethod( + getListTagsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ListTagsRequest, + com.google.cloud.datacatalog.v1.ListTagsResponse>(this, METHODID_LIST_TAGS))) + .addMethod( + getSetIamPolicyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( + this, METHODID_SET_IAM_POLICY))) + .addMethod( + getGetIamPolicyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( + this, METHODID_GET_IAM_POLICY))) + .addMethod( + getTestIamPermissionsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse>( + this, METHODID_TEST_IAM_PERMISSIONS))) + .build(); + } + } + + /** + * + * + *
+   * Data Catalog API service allows clients to discover, understand, and manage
+   * their data.
+   * 
+ */ + public static final class DataCatalogStub + extends io.grpc.stub.AbstractAsyncStub { + private DataCatalogStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogStub(channel, callOptions); + } + + /** + * + * + *
+     * Searches Data Catalog for multiple resources like entries, tags that
+     * match a query.
+     * This is a custom method
+     * (https://cloud.google.com/apis/design/custom_methods) and does not return
+     * the complete resource, only the resource identifier and high level
+     * fields. Clients can subsequentally call `Get` methods.
+     * Note that Data Catalog search queries do not guarantee full recall. Query
+     * results that match your query may not be returned, even in subsequent
+     * result pages. Also note that results returned (and not returned) can vary
+     * across repeated search queries.
+     * See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ */ + public void searchCatalog( + com.google.cloud.datacatalog.v1.SearchCatalogRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSearchCatalogMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an EntryGroup.
+     * An entry group contains logically related entries together with Cloud
+     * Identity and Access Management policies that specify the users who can
+     * create, edit, and view entries within the entry group.
+     * Data Catalog automatically creates an entry group for BigQuery entries
+     * ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry
+     * group to contain Cloud Storage fileset entries or custom type entries,
+     * and the IAM policies associated with those entries. Entry groups, like
+     * entries, can be searched.
+     * A maximum of 10,000 entry groups may be created per organization across all
+     * locations.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void createEntryGroup( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateEntryGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an EntryGroup.
+     * 
+ */ + public void getEntryGroup( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetEntryGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an EntryGroup. The user should enable the Data Catalog API in the
+     * project identified by the `entry_group.name` parameter (see [Data Catalog
+     * Resource Project] (/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void updateEntryGroup( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateEntryGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an EntryGroup. Only entry groups that do not contain entries can be
+     * deleted. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteEntryGroup( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteEntryGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists entry groups.
+     * 
+ */ + public void listEntryGroups( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEntryGroupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
+     * be created.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * A maximum of 100,000 entries may be created per entry group.
+     * 
+ */ + public void createEntry( + com.google.cloud.datacatalog.v1.CreateEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an existing entry.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `entry.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateEntry( + com.google.cloud.datacatalog.v1.UpdateEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing entry. Only entries created through
+     * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]
+     * method can be deleted.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteEntry( + com.google.cloud.datacatalog.v1.DeleteEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an entry.
+     * 
+ */ + public void getEntry( + com.google.cloud.datacatalog.v1.GetEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetEntryMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Data Catalog Entry.
+     * 
+ */ + public void lookupEntry( + com.google.cloud.datacatalog.v1.LookupEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLookupEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists entries.
+     * 
+ */ + public void listEntries( + com.google.cloud.datacatalog.v1.ListEntriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEntriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a tag template. The user should enable the Data Catalog API in
+     * the project identified by the `parent` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void createTagTemplate( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTagTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a tag template.
+     * 
+ */ + public void getTagTemplate( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTagTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a tag template. This method cannot be used to update the fields of
+     * a template. The tag template fields are represented as separate resources
+     * and should be updated using their own create/update/delete methods.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `tag_template.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateTagTemplate( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTagTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a tag template and all tags using the template.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteTagTemplate( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTagTemplateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `parent` parameter (see
+     * [Data Catalog Resource
+     * Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void createTagTemplateField( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTagTemplateFieldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a field in a tag template. This method cannot be used to update the
+     * field type. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void updateTagTemplateField( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTagTemplateFieldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Renames a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `name` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public void renameTagTemplateField( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRenameTagTemplateFieldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a field in a tag template and all uses of that field.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public void deleteTagTemplateField( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTagTemplateFieldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * Note: The project identified by the `parent` parameter for the
+     * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)
+     * and the
+     * [tag
+     * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)
+     * used to create the tag must be from the same organization.
+     * 
+ */ + public void createTag( + com.google.cloud.datacatalog.v1.CreateTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTagMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates an existing tag.
+     * 
+ */ + public void updateTag( + com.google.cloud.datacatalog.v1.UpdateTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTagMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a tag.
+     * 
+ */ + public void deleteTag( + com.google.cloud.datacatalog.v1.DeleteTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTagMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * 
+ */ + public void listTags( + com.google.cloud.datacatalog.v1.ListTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTagsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Sets the access control policy for a resource. Replaces any existing
+     * policy.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
+     *     templates.
+     *   - `datacatalog.entries.setIamPolicy` to set policies on entries.
+     *   - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+     * 
+ */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the access control policy for a resource. A `NOT_FOUND` error
+     * is returned if the resource does not exist. An empty policy is returned
+     * if the resource exists but does not have a policy set on it.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
+     *     templates.
+     *   - `datacatalog.entries.getIamPolicy` to get policies on entries.
+     *   - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+     * 
+ */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the caller's permissions on a resource.
+     * If the resource does not exist, an empty set of permissions is returned
+     * (We don't return a `NOT_FOUND` error).
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * A caller is not required to have Google IAM permission to make this
+     * request.
+     * 
+ */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Data Catalog API service allows clients to discover, understand, and manage
+   * their data.
+   * 
+ */ + public static final class DataCatalogBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataCatalogBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Searches Data Catalog for multiple resources like entries, tags that
+     * match a query.
+     * This is a custom method
+     * (https://cloud.google.com/apis/design/custom_methods) and does not return
+     * the complete resource, only the resource identifier and high level
+     * fields. Clients can subsequentally call `Get` methods.
+     * Note that Data Catalog search queries do not guarantee full recall. Query
+     * results that match your query may not be returned, even in subsequent
+     * result pages. Also note that results returned (and not returned) can vary
+     * across repeated search queries.
+     * See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.SearchCatalogResponse searchCatalog( + com.google.cloud.datacatalog.v1.SearchCatalogRequest request) { + return blockingUnaryCall(getChannel(), getSearchCatalogMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an EntryGroup.
+     * An entry group contains logically related entries together with Cloud
+     * Identity and Access Management policies that specify the users who can
+     * create, edit, and view entries within the entry group.
+     * Data Catalog automatically creates an entry group for BigQuery entries
+     * ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry
+     * group to contain Cloud Storage fileset entries or custom type entries,
+     * and the IAM policies associated with those entries. Entry groups, like
+     * entries, can be searched.
+     * A maximum of 10,000 entry groups may be created per organization across all
+     * locations.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.EntryGroup createEntryGroup( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest request) { + return blockingUnaryCall( + getChannel(), getCreateEntryGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an EntryGroup.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest request) { + return blockingUnaryCall(getChannel(), getGetEntryGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an EntryGroup. The user should enable the Data Catalog API in the
+     * project identified by the `entry_group.name` parameter (see [Data Catalog
+     * Resource Project] (/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.EntryGroup updateEntryGroup( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateEntryGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an EntryGroup. Only entry groups that do not contain entries can be
+     * deleted. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.protobuf.Empty deleteEntryGroup( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteEntryGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists entry groups.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse listEntryGroups( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest request) { + return blockingUnaryCall(getChannel(), getListEntryGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
+     * be created.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * A maximum of 100,000 entries may be created per entry group.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Entry createEntry( + com.google.cloud.datacatalog.v1.CreateEntryRequest request) { + return blockingUnaryCall(getChannel(), getCreateEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an existing entry.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `entry.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Entry updateEntry( + com.google.cloud.datacatalog.v1.UpdateEntryRequest request) { + return blockingUnaryCall(getChannel(), getUpdateEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing entry. Only entries created through
+     * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]
+     * method can be deleted.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.protobuf.Empty deleteEntry( + com.google.cloud.datacatalog.v1.DeleteEntryRequest request) { + return blockingUnaryCall(getChannel(), getDeleteEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an entry.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Entry getEntry( + com.google.cloud.datacatalog.v1.GetEntryRequest request) { + return blockingUnaryCall(getChannel(), getGetEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Data Catalog Entry.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Entry lookupEntry( + com.google.cloud.datacatalog.v1.LookupEntryRequest request) { + return blockingUnaryCall(getChannel(), getLookupEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists entries.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.ListEntriesResponse listEntries( + com.google.cloud.datacatalog.v1.ListEntriesRequest request) { + return blockingUnaryCall(getChannel(), getListEntriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a tag template. The user should enable the Data Catalog API in
+     * the project identified by the `parent` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplate createTagTemplate( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest request) { + return blockingUnaryCall( + getChannel(), getCreateTagTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a tag template.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest request) { + return blockingUnaryCall(getChannel(), getGetTagTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a tag template. This method cannot be used to update the fields of
+     * a template. The tag template fields are represented as separate resources
+     * and should be updated using their own create/update/delete methods.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `tag_template.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplate updateTagTemplate( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateTagTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a tag template and all tags using the template.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.protobuf.Empty deleteTagTemplate( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteTagTemplateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `parent` parameter (see
+     * [Data Catalog Resource
+     * Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplateField createTagTemplateField( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest request) { + return blockingUnaryCall( + getChannel(), getCreateTagTemplateFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a field in a tag template. This method cannot be used to update the
+     * field type. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplateField updateTagTemplateField( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateTagTemplateFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Renames a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `name` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.cloud.datacatalog.v1.TagTemplateField renameTagTemplateField( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest request) { + return blockingUnaryCall( + getChannel(), getRenameTagTemplateFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a field in a tag template and all uses of that field.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.protobuf.Empty deleteTagTemplateField( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteTagTemplateFieldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * Note: The project identified by the `parent` parameter for the
+     * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)
+     * and the
+     * [tag
+     * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)
+     * used to create the tag must be from the same organization.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Tag createTag( + com.google.cloud.datacatalog.v1.CreateTagRequest request) { + return blockingUnaryCall(getChannel(), getCreateTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an existing tag.
+     * 
+ */ + public com.google.cloud.datacatalog.v1.Tag updateTag( + com.google.cloud.datacatalog.v1.UpdateTagRequest request) { + return blockingUnaryCall(getChannel(), getUpdateTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a tag.
+     * 
+ */ + public com.google.protobuf.Empty deleteTag( + com.google.cloud.datacatalog.v1.DeleteTagRequest request) { + return blockingUnaryCall(getChannel(), getDeleteTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * 
+ */ + public com.google.cloud.datacatalog.v1.ListTagsResponse listTags( + com.google.cloud.datacatalog.v1.ListTagsRequest request) { + return blockingUnaryCall(getChannel(), getListTagsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Sets the access control policy for a resource. Replaces any existing
+     * policy.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
+     *     templates.
+     *   - `datacatalog.entries.setIamPolicy` to set policies on entries.
+     *   - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return blockingUnaryCall(getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the access control policy for a resource. A `NOT_FOUND` error
+     * is returned if the resource does not exist. An empty policy is returned
+     * if the resource exists but does not have a policy set on it.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
+     *     templates.
+     *   - `datacatalog.entries.getIamPolicy` to get policies on entries.
+     *   - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return blockingUnaryCall(getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the caller's permissions on a resource.
+     * If the resource does not exist, an empty set of permissions is returned
+     * (We don't return a `NOT_FOUND` error).
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * A caller is not required to have Google IAM permission to make this
+     * request.
+     * 
+ */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + return blockingUnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Data Catalog API service allows clients to discover, understand, and manage
+   * their data.
+   * 
+ */ + public static final class DataCatalogFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataCatalogFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataCatalogFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataCatalogFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Searches Data Catalog for multiple resources like entries, tags that
+     * match a query.
+     * This is a custom method
+     * (https://cloud.google.com/apis/design/custom_methods) and does not return
+     * the complete resource, only the resource identifier and high level
+     * fields. Clients can subsequentally call `Get` methods.
+     * Note that Data Catalog search queries do not guarantee full recall. Query
+     * results that match your query may not be returned, even in subsequent
+     * result pages. Also note that results returned (and not returned) can vary
+     * across repeated search queries.
+     * See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.SearchCatalogResponse> + searchCatalog(com.google.cloud.datacatalog.v1.SearchCatalogRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchCatalogMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an EntryGroup.
+     * An entry group contains logically related entries together with Cloud
+     * Identity and Access Management policies that specify the users who can
+     * create, edit, and view entries within the entry group.
+     * Data Catalog automatically creates an entry group for BigQuery entries
+     * ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry
+     * group to contain Cloud Storage fileset entries or custom type entries,
+     * and the IAM policies associated with those entries. Entry groups, like
+     * entries, can be searched.
+     * A maximum of 10,000 entry groups may be created per organization across all
+     * locations.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.EntryGroup> + createEntryGroup(com.google.cloud.datacatalog.v1.CreateEntryGroupRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateEntryGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an EntryGroup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.EntryGroup> + getEntryGroup(com.google.cloud.datacatalog.v1.GetEntryGroupRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetEntryGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an EntryGroup. The user should enable the Data Catalog API in the
+     * project identified by the `entry_group.name` parameter (see [Data Catalog
+     * Resource Project] (/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.EntryGroup> + updateEntryGroup(com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateEntryGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an EntryGroup. Only entry groups that do not contain entries can be
+     * deleted. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEntryGroup(com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteEntryGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists entry groups.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse> + listEntryGroups(com.google.cloud.datacatalog.v1.ListEntryGroupsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEntryGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
+     * be created.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `parent` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * A maximum of 100,000 entries may be created per entry group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEntry(com.google.cloud.datacatalog.v1.CreateEntryRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an existing entry.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `entry.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateEntry(com.google.cloud.datacatalog.v1.UpdateEntryRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing entry. Only entries created through
+     * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]
+     * method can be deleted.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEntry(com.google.cloud.datacatalog.v1.DeleteEntryRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an entry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getEntry(com.google.cloud.datacatalog.v1.GetEntryRequest request) { + return futureUnaryCall(getChannel().newCall(getGetEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an entry by target resource name. This method allows clients to use
+     * the resource name from the source Google Cloud Platform service to get the
+     * Data Catalog Entry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + lookupEntry(com.google.cloud.datacatalog.v1.LookupEntryRequest request) { + return futureUnaryCall( + getChannel().newCall(getLookupEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists entries.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ListEntriesResponse> + listEntries(com.google.cloud.datacatalog.v1.ListEntriesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEntriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a tag template. The user should enable the Data Catalog API in
+     * the project identified by the `parent` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplate> + createTagTemplate(com.google.cloud.datacatalog.v1.CreateTagTemplateRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTagTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a tag template.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplate> + getTagTemplate(com.google.cloud.datacatalog.v1.GetTagTemplateRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTagTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a tag template. This method cannot be used to update the fields of
+     * a template. The tag template fields are represented as separate resources
+     * and should be updated using their own create/update/delete methods.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `tag_template.name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplate> + updateTagTemplate(com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateTagTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a tag template and all tags using the template.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTagTemplate(com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteTagTemplateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `parent` parameter (see
+     * [Data Catalog Resource
+     * Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplateField> + createTagTemplateField( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTagTemplateFieldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a field in a tag template. This method cannot be used to update the
+     * field type. Users should enable the Data Catalog API in the project
+     * identified by the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplateField> + updateTagTemplateField( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateTagTemplateFieldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Renames a field in a tag template. The user should enable the Data Catalog
+     * API in the project identified by the `name` parameter (see [Data Catalog
+     * Resource Project](/data-catalog/docs/concepts/resource-project) for more
+     * information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplateField> + renameTagTemplateField( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getRenameTagTemplateFieldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a field in a tag template and all uses of that field.
+     * Users should enable the Data Catalog API in the project identified by
+     * the `name` parameter (see [Data Catalog Resource Project]
+     * (/data-catalog/docs/concepts/resource-project) for more information).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTagTemplateField( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteTagTemplateFieldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * Note: The project identified by the `parent` parameter for the
+     * [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)
+     * and the
+     * [tag
+     * template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)
+     * used to create the tag must be from the same organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTag(com.google.cloud.datacatalog.v1.CreateTagRequest request) { + return futureUnaryCall(getChannel().newCall(getCreateTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an existing tag.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateTag(com.google.cloud.datacatalog.v1.UpdateTagRequest request) { + return futureUnaryCall(getChannel().newCall(getUpdateTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a tag.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteTag( + com.google.cloud.datacatalog.v1.DeleteTagRequest request) { + return futureUnaryCall(getChannel().newCall(getDeleteTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ListTagsResponse> + listTags(com.google.cloud.datacatalog.v1.ListTagsRequest request) { + return futureUnaryCall(getChannel().newCall(getListTagsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Sets the access control policy for a resource. Replaces any existing
+     * policy.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
+     *     templates.
+     *   - `datacatalog.entries.setIamPolicy` to set policies on entries.
+     *   - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the access control policy for a resource. A `NOT_FOUND` error
+     * is returned if the resource does not exist. An empty policy is returned
+     * if the resource exists but does not have a policy set on it.
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * Callers must have following Google IAM permission
+     *   - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
+     *     templates.
+     *   - `datacatalog.entries.getIamPolicy` to get policies on entries.
+     *   - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the caller's permissions on a resource.
+     * If the resource does not exist, an empty set of permissions is returned
+     * (We don't return a `NOT_FOUND` error).
+     * Supported resources are:
+     *   - Tag templates.
+     *   - Entries.
+     *   - Entry groups.
+     * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub
+     * and any external Google Cloud Platform resources synced to Data Catalog.
+     * A caller is not required to have Google IAM permission to make this
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v1.TestIamPermissionsResponse> + testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { + return futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH_CATALOG = 0; + private static final int METHODID_CREATE_ENTRY_GROUP = 1; + private static final int METHODID_GET_ENTRY_GROUP = 2; + private static final int METHODID_UPDATE_ENTRY_GROUP = 3; + private static final int METHODID_DELETE_ENTRY_GROUP = 4; + private static final int METHODID_LIST_ENTRY_GROUPS = 5; + private static final int METHODID_CREATE_ENTRY = 6; + private static final int METHODID_UPDATE_ENTRY = 7; + private static final int METHODID_DELETE_ENTRY = 8; + private static final int METHODID_GET_ENTRY = 9; + private static final int METHODID_LOOKUP_ENTRY = 10; + private static final int METHODID_LIST_ENTRIES = 11; + private static final int METHODID_CREATE_TAG_TEMPLATE = 12; + private static final int METHODID_GET_TAG_TEMPLATE = 13; + private static final int METHODID_UPDATE_TAG_TEMPLATE = 14; + private static final int METHODID_DELETE_TAG_TEMPLATE = 15; + private static final int METHODID_CREATE_TAG_TEMPLATE_FIELD = 16; + private static final int METHODID_UPDATE_TAG_TEMPLATE_FIELD = 17; + private static final int METHODID_RENAME_TAG_TEMPLATE_FIELD = 18; + private static final int METHODID_DELETE_TAG_TEMPLATE_FIELD = 19; + private static final int METHODID_CREATE_TAG = 20; + private static final int METHODID_UPDATE_TAG = 21; + private static final int METHODID_DELETE_TAG = 22; + private static final int METHODID_LIST_TAGS = 23; + private static final int METHODID_SET_IAM_POLICY = 24; + private static final int METHODID_GET_IAM_POLICY = 25; + private static final int METHODID_TEST_IAM_PERMISSIONS = 26; + + 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 DataCatalogImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataCatalogImplBase 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_SEARCH_CATALOG: + serviceImpl.searchCatalog( + (com.google.cloud.datacatalog.v1.SearchCatalogRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ENTRY_GROUP: + serviceImpl.createEntryGroup( + (com.google.cloud.datacatalog.v1.CreateEntryGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ENTRY_GROUP: + serviceImpl.getEntryGroup( + (com.google.cloud.datacatalog.v1.GetEntryGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ENTRY_GROUP: + serviceImpl.updateEntryGroup( + (com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ENTRY_GROUP: + serviceImpl.deleteEntryGroup( + (com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ENTRY_GROUPS: + serviceImpl.listEntryGroups( + (com.google.cloud.datacatalog.v1.ListEntryGroupsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ENTRY: + serviceImpl.createEntry( + (com.google.cloud.datacatalog.v1.CreateEntryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ENTRY: + serviceImpl.updateEntry( + (com.google.cloud.datacatalog.v1.UpdateEntryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ENTRY: + serviceImpl.deleteEntry( + (com.google.cloud.datacatalog.v1.DeleteEntryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ENTRY: + serviceImpl.getEntry( + (com.google.cloud.datacatalog.v1.GetEntryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LOOKUP_ENTRY: + serviceImpl.lookupEntry( + (com.google.cloud.datacatalog.v1.LookupEntryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ENTRIES: + serviceImpl.listEntries( + (com.google.cloud.datacatalog.v1.ListEntriesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_TAG_TEMPLATE: + serviceImpl.createTagTemplate( + (com.google.cloud.datacatalog.v1.CreateTagTemplateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TAG_TEMPLATE: + serviceImpl.getTagTemplate( + (com.google.cloud.datacatalog.v1.GetTagTemplateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TAG_TEMPLATE: + serviceImpl.updateTagTemplate( + (com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TAG_TEMPLATE: + serviceImpl.deleteTagTemplate( + (com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_TAG_TEMPLATE_FIELD: + serviceImpl.createTagTemplateField( + (com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TAG_TEMPLATE_FIELD: + serviceImpl.updateTagTemplateField( + (com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RENAME_TAG_TEMPLATE_FIELD: + serviceImpl.renameTagTemplateField( + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TAG_TEMPLATE_FIELD: + serviceImpl.deleteTagTemplateField( + (com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_TAG: + serviceImpl.createTag( + (com.google.cloud.datacatalog.v1.CreateTagRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_TAG: + serviceImpl.updateTag( + (com.google.cloud.datacatalog.v1.UpdateTagRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TAG: + serviceImpl.deleteTag( + (com.google.cloud.datacatalog.v1.DeleteTagRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TAGS: + serviceImpl.listTags( + (com.google.cloud.datacatalog.v1.ListTagsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TEST_IAM_PERMISSIONS: + serviceImpl.testIamPermissions( + (com.google.iam.v1.TestIamPermissionsRequest) 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 abstract static class DataCatalogBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataCatalogBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataCatalog"); + } + } + + private static final class DataCatalogFileDescriptorSupplier + extends DataCatalogBaseDescriptorSupplier { + DataCatalogFileDescriptorSupplier() {} + } + + private static final class DataCatalogMethodDescriptorSupplier + extends DataCatalogBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataCatalogMethodDescriptorSupplier(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 (DataCatalogGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataCatalogFileDescriptorSupplier()) + .addMethod(getSearchCatalogMethod()) + .addMethod(getCreateEntryGroupMethod()) + .addMethod(getGetEntryGroupMethod()) + .addMethod(getUpdateEntryGroupMethod()) + .addMethod(getDeleteEntryGroupMethod()) + .addMethod(getListEntryGroupsMethod()) + .addMethod(getCreateEntryMethod()) + .addMethod(getUpdateEntryMethod()) + .addMethod(getDeleteEntryMethod()) + .addMethod(getGetEntryMethod()) + .addMethod(getLookupEntryMethod()) + .addMethod(getListEntriesMethod()) + .addMethod(getCreateTagTemplateMethod()) + .addMethod(getGetTagTemplateMethod()) + .addMethod(getUpdateTagTemplateMethod()) + .addMethod(getDeleteTagTemplateMethod()) + .addMethod(getCreateTagTemplateFieldMethod()) + .addMethod(getUpdateTagTemplateFieldMethod()) + .addMethod(getRenameTagTemplateFieldMethod()) + .addMethod(getDeleteTagTemplateFieldMethod()) + .addMethod(getCreateTagMethod()) + .addMethod(getUpdateTagMethod()) + .addMethod(getDeleteTagMethod()) + .addMethod(getListTagsMethod()) + .addMethod(getSetIamPolicyMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getTestIamPermissionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index 585eb110..35e54137 100644 --- a/pom.xml +++ b/pom.xml @@ -79,11 +79,21 @@ + + com.google.api.grpc + proto-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 0.33.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 @@ -189,7 +199,9 @@ + proto-google-cloud-datacatalog-v1 proto-google-cloud-datacatalog-v1beta1 + grpc-google-cloud-datacatalog-v1 grpc-google-cloud-datacatalog-v1beta1 google-cloud-datacatalog google-cloud-datacatalog-bom diff --git a/proto-google-cloud-datacatalog-v1/pom.xml b/proto-google-cloud-datacatalog-v1/pom.xml new file mode 100644 index 00000000..e9c74249 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-datacatalog-v1 + 0.33.1-SNAPSHOT + proto-google-cloud-datacatalog-v1 + PROTO library for proto-google-cloud-datacatalog-v1 + + com.google.cloud + google-cloud-datacatalog-parent + 0.33.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpec.java new file mode 100644 index 00000000..c1de0004 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpec.java @@ -0,0 +1,946 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`.
+ * Context:
+ * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.BigQueryDateShardedSpec} + */ +public final class BigQueryDateShardedSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.BigQueryDateShardedSpec) + BigQueryDateShardedSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDateShardedSpec.newBuilder() to construct. + private BigQueryDateShardedSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryDateShardedSpec() { + dataset_ = ""; + tablePrefix_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryDateShardedSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryDateShardedSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + dataset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tablePrefix_ = s; + break; + } + case 24: + { + shardCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.class, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Output only. The Data Catalog resource name of the dataset entry the current table
+   * belongs to, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Data Catalog resource name of the dataset entry the current table
+   * belongs to, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_PREFIX_FIELD_NUMBER = 2; + private volatile java.lang.Object tablePrefix_; + /** + * + * + *
+   * Output only. The table name prefix of the shards. The name of any given shard is
+   * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+   * `table_prefix` is `MyTable`.
+   * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tablePrefix. + */ + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tablePrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The table name prefix of the shards. The name of any given shard is
+   * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+   * `table_prefix` is `MyTable`.
+   * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tablePrefix. + */ + public com.google.protobuf.ByteString getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHARD_COUNT_FIELD_NUMBER = 3; + private long shardCount_; + /** + * + * + *
+   * Output only. Total number of shards.
+   * 
+ * + * int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardCount. + */ + public long getShardCount() { + return shardCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getTablePrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tablePrefix_); + } + if (shardCount_ != 0L) { + output.writeInt64(3, shardCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getTablePrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tablePrefix_); + } + if (shardCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, shardCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec other = + (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getTablePrefix().equals(other.getTablePrefix())) return false; + if (getShardCount() != other.getShardCount()) return false; + if (!unknownFields.equals(other.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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getTablePrefix().hashCode(); + hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getShardCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`.
+   * Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.BigQueryDateShardedSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.BigQueryDateShardedSpec) + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.class, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + tablePrefix_ = ""; + + shardCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec build() { + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec buildPartial() { + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec result = + new com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec(this); + result.dataset_ = dataset_; + result.tablePrefix_ = tablePrefix_; + result.shardCount_ = shardCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec other) { + if (other == com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTablePrefix().isEmpty()) { + tablePrefix_ = other.tablePrefix_; + onChanged(); + } + if (other.getShardCount() != 0L) { + setShardCount(other.getShardCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Output only. The Data Catalog resource name of the dataset entry the current table
+     * belongs to, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the dataset entry the current table
+     * belongs to, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the dataset entry the current table
+     * belongs to, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the dataset entry the current table
+     * belongs to, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Data Catalog resource name of the dataset entry the current table
+     * belongs to, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object tablePrefix_ = ""; + /** + * + * + *
+     * Output only. The table name prefix of the shards. The name of any given shard is
+     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+     * `table_prefix` is `MyTable`.
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tablePrefix. + */ + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tablePrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The table name prefix of the shards. The name of any given shard is
+     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+     * `table_prefix` is `MyTable`.
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tablePrefix. + */ + public com.google.protobuf.ByteString getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The table name prefix of the shards. The name of any given shard is
+     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+     * `table_prefix` is `MyTable`.
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tablePrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The table name prefix of the shards. The name of any given shard is
+     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+     * `table_prefix` is `MyTable`.
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTablePrefix() { + + tablePrefix_ = getDefaultInstance().getTablePrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The table name prefix of the shards. The name of any given shard is
+     * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+     * `table_prefix` is `MyTable`.
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tablePrefix_ = value; + onChanged(); + return this; + } + + private long shardCount_; + /** + * + * + *
+     * Output only. Total number of shards.
+     * 
+ * + * int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardCount. + */ + public long getShardCount() { + return shardCount_; + } + /** + * + * + *
+     * Output only. Total number of shards.
+     * 
+ * + * int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The shardCount to set. + * @return This builder for chaining. + */ + public Builder setShardCount(long value) { + + shardCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Total number of shards.
+     * 
+ * + * int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearShardCount() { + + shardCount_ = 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.cloud.datacatalog.v1.BigQueryDateShardedSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.BigQueryDateShardedSpec) + private static final com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec(); + } + + public static com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDateShardedSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDateShardedSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpecOrBuilder.java new file mode 100644 index 00000000..ed07eaf6 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryDateShardedSpecOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface BigQueryDateShardedSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.BigQueryDateShardedSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The Data Catalog resource name of the dataset entry the current table
+   * belongs to, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Output only. The Data Catalog resource name of the dataset entry the current table
+   * belongs to, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * 
+ * + * + * string dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. The table name prefix of the shards. The name of any given shard is
+   * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+   * `table_prefix` is `MyTable`.
+   * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tablePrefix. + */ + java.lang.String getTablePrefix(); + /** + * + * + *
+   * Output only. The table name prefix of the shards. The name of any given shard is
+   * `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the
+   * `table_prefix` is `MyTable`.
+   * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tablePrefix. + */ + com.google.protobuf.ByteString getTablePrefixBytes(); + + /** + * + * + *
+   * Output only. Total number of shards.
+   * 
+ * + * int64 shard_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardCount. + */ + long getShardCount(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpec.java new file mode 100644 index 00000000..f70269a5 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpec.java @@ -0,0 +1,1315 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Describes a BigQuery table.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.BigQueryTableSpec} + */ +public final class BigQueryTableSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.BigQueryTableSpec) + BigQueryTableSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryTableSpec.newBuilder() to construct. + private BigQueryTableSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryTableSpec() { + tableSourceType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryTableSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryTableSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder 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(); + + tableSourceType_ = rawValue; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.ViewSpec.Builder subBuilder = null; + if (typeSpecCase_ == 2) { + subBuilder = ((com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_).toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.ViewSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datacatalog.v1.TableSpec.Builder subBuilder = null; + if (typeSpecCase_ == 3) { + subBuilder = ((com.google.cloud.datacatalog.v1.TableSpec) typeSpec_).toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TableSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.TableSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 3; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.BigQueryTableSpec.class, + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder.class); + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public enum TypeSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIEW_SPEC(2), + TABLE_SPEC(3), + TYPESPEC_NOT_SET(0); + private final int value; + + private TypeSpecCase(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 TypeSpecCase valueOf(int value) { + return forNumber(value); + } + + public static TypeSpecCase forNumber(int value) { + switch (value) { + case 2: + return VIEW_SPEC; + case 3: + return TABLE_SPEC; + case 0: + return TYPESPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public static final int TABLE_SOURCE_TYPE_FIELD_NUMBER = 1; + private int tableSourceType_; + /** + * + * + *
+   * Output only. The table source type.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for tableSourceType. + */ + public int getTableSourceTypeValue() { + return tableSourceType_; + } + /** + * + * + *
+   * Output only. The table source type.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tableSourceType. + */ + public com.google.cloud.datacatalog.v1.TableSourceType getTableSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.TableSourceType result = + com.google.cloud.datacatalog.v1.TableSourceType.valueOf(tableSourceType_); + return result == null ? com.google.cloud.datacatalog.v1.TableSourceType.UNRECOGNIZED : result; + } + + public static final int VIEW_SPEC_FIELD_NUMBER = 2; + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return Whether the viewSpec field is set. + */ + public boolean hasViewSpec() { + return typeSpecCase_ == 2; + } + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return The viewSpec. + */ + public com.google.cloud.datacatalog.v1.ViewSpec getViewSpec() { + if (typeSpecCase_ == 2) { + return (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.v1.ViewSpecOrBuilder getViewSpecOrBuilder() { + if (typeSpecCase_ == 2) { + return (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + + public static final int TABLE_SPEC_FIELD_NUMBER = 3; + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return Whether the tableSpec field is set. + */ + public boolean hasTableSpec() { + return typeSpecCase_ == 3; + } + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return The tableSpec. + */ + public com.google.cloud.datacatalog.v1.TableSpec getTableSpec() { + if (typeSpecCase_ == 3) { + return (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public com.google.cloud.datacatalog.v1.TableSpecOrBuilder getTableSpecOrBuilder() { + if (typeSpecCase_ == 3) { + return (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.TableSpec.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 (tableSourceType_ + != com.google.cloud.datacatalog.v1.TableSourceType.TABLE_SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, tableSourceType_); + } + if (typeSpecCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_); + } + if (typeSpecCase_ == 3) { + output.writeMessage(3, (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tableSourceType_ + != com.google.cloud.datacatalog.v1.TableSourceType.TABLE_SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, tableSourceType_); + } + if (typeSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_); + } + if (typeSpecCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.BigQueryTableSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.BigQueryTableSpec other = + (com.google.cloud.datacatalog.v1.BigQueryTableSpec) obj; + + if (tableSourceType_ != other.tableSourceType_) return false; + if (!getTypeSpecCase().equals(other.getTypeSpecCase())) return false; + switch (typeSpecCase_) { + case 2: + if (!getViewSpec().equals(other.getViewSpec())) return false; + break; + case 3: + if (!getTableSpec().equals(other.getTableSpec())) 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) + TABLE_SOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + tableSourceType_; + switch (typeSpecCase_) { + case 2: + hash = (37 * hash) + VIEW_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getViewSpec().hashCode(); + break; + case 3: + hash = (37 * hash) + TABLE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTableSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.BigQueryTableSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a BigQuery table.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.BigQueryTableSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.BigQueryTableSpec) + com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.BigQueryTableSpec.class, + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.BigQueryTableSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tableSourceType_ = 0; + + typeSpecCase_ = 0; + typeSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryTableSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryTableSpec build() { + com.google.cloud.datacatalog.v1.BigQueryTableSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryTableSpec buildPartial() { + com.google.cloud.datacatalog.v1.BigQueryTableSpec result = + new com.google.cloud.datacatalog.v1.BigQueryTableSpec(this); + result.tableSourceType_ = tableSourceType_; + if (typeSpecCase_ == 2) { + if (viewSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = viewSpecBuilder_.build(); + } + } + if (typeSpecCase_ == 3) { + if (tableSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = tableSpecBuilder_.build(); + } + } + result.typeSpecCase_ = typeSpecCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.BigQueryTableSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.BigQueryTableSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.BigQueryTableSpec other) { + if (other == com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance()) + return this; + if (other.tableSourceType_ != 0) { + setTableSourceTypeValue(other.getTableSourceTypeValue()); + } + switch (other.getTypeSpecCase()) { + case VIEW_SPEC: + { + mergeViewSpec(other.getViewSpec()); + break; + } + case TABLE_SPEC: + { + mergeTableSpec(other.getTableSpec()); + break; + } + case TYPESPEC_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.cloud.datacatalog.v1.BigQueryTableSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.BigQueryTableSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public Builder clearTypeSpec() { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + return this; + } + + private int tableSourceType_ = 0; + /** + * + * + *
+     * Output only. The table source type.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for tableSourceType. + */ + public int getTableSourceTypeValue() { + return tableSourceType_; + } + /** + * + * + *
+     * Output only. The table source type.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for tableSourceType to set. + * @return This builder for chaining. + */ + public Builder setTableSourceTypeValue(int value) { + tableSourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The table source type.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tableSourceType. + */ + public com.google.cloud.datacatalog.v1.TableSourceType getTableSourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.TableSourceType result = + com.google.cloud.datacatalog.v1.TableSourceType.valueOf(tableSourceType_); + return result == null ? com.google.cloud.datacatalog.v1.TableSourceType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The table source type.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The tableSourceType to set. + * @return This builder for chaining. + */ + public Builder setTableSourceType(com.google.cloud.datacatalog.v1.TableSourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + tableSourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The table source type.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTableSourceType() { + + tableSourceType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.ViewSpec, + com.google.cloud.datacatalog.v1.ViewSpec.Builder, + com.google.cloud.datacatalog.v1.ViewSpecOrBuilder> + viewSpecBuilder_; + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return Whether the viewSpec field is set. + */ + public boolean hasViewSpec() { + return typeSpecCase_ == 2; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return The viewSpec. + */ + public com.google.cloud.datacatalog.v1.ViewSpec getViewSpec() { + if (viewSpecBuilder_ == null) { + if (typeSpecCase_ == 2) { + return (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 2) { + return viewSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public Builder setViewSpec(com.google.cloud.datacatalog.v1.ViewSpec value) { + if (viewSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + viewSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public Builder setViewSpec(com.google.cloud.datacatalog.v1.ViewSpec.Builder builderForValue) { + if (viewSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + viewSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public Builder mergeViewSpec(com.google.cloud.datacatalog.v1.ViewSpec value) { + if (viewSpecBuilder_ == null) { + if (typeSpecCase_ == 2 + && typeSpec_ != com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.v1.ViewSpec.newBuilder( + (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 2) { + viewSpecBuilder_.mergeFrom(value); + } + viewSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public Builder clearViewSpec() { + if (viewSpecBuilder_ == null) { + if (typeSpecCase_ == 2) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 2) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + viewSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.v1.ViewSpec.Builder getViewSpecBuilder() { + return getViewSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + public com.google.cloud.datacatalog.v1.ViewSpecOrBuilder getViewSpecOrBuilder() { + if ((typeSpecCase_ == 2) && (viewSpecBuilder_ != null)) { + return viewSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 2) { + return (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Table view specification. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_VIEW`.
+     * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.ViewSpec, + com.google.cloud.datacatalog.v1.ViewSpec.Builder, + com.google.cloud.datacatalog.v1.ViewSpecOrBuilder> + getViewSpecFieldBuilder() { + if (viewSpecBuilder_ == null) { + if (!(typeSpecCase_ == 2)) { + typeSpec_ = com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + viewSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.ViewSpec, + com.google.cloud.datacatalog.v1.ViewSpec.Builder, + com.google.cloud.datacatalog.v1.ViewSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.ViewSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 2; + onChanged(); + ; + return viewSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TableSpec, + com.google.cloud.datacatalog.v1.TableSpec.Builder, + com.google.cloud.datacatalog.v1.TableSpecOrBuilder> + tableSpecBuilder_; + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return Whether the tableSpec field is set. + */ + public boolean hasTableSpec() { + return typeSpecCase_ == 3; + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return The tableSpec. + */ + public com.google.cloud.datacatalog.v1.TableSpec getTableSpec() { + if (tableSpecBuilder_ == null) { + if (typeSpecCase_ == 3) { + return (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 3) { + return tableSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public Builder setTableSpec(com.google.cloud.datacatalog.v1.TableSpec value) { + if (tableSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + tableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 3; + return this; + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public Builder setTableSpec(com.google.cloud.datacatalog.v1.TableSpec.Builder builderForValue) { + if (tableSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + tableSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 3; + return this; + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public Builder mergeTableSpec(com.google.cloud.datacatalog.v1.TableSpec value) { + if (tableSpecBuilder_ == null) { + if (typeSpecCase_ == 3 + && typeSpec_ != com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.v1.TableSpec.newBuilder( + (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 3) { + tableSpecBuilder_.mergeFrom(value); + } + tableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 3; + return this; + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public Builder clearTableSpec() { + if (tableSpecBuilder_ == null) { + if (typeSpecCase_ == 3) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 3) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + tableSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public com.google.cloud.datacatalog.v1.TableSpec.Builder getTableSpecBuilder() { + return getTableSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + public com.google.cloud.datacatalog.v1.TableSpecOrBuilder getTableSpecOrBuilder() { + if ((typeSpecCase_ == 3) && (tableSpecBuilder_ != null)) { + return tableSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 3) { + return (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Spec of a BigQuery table. This field should only be populated if
+     * `table_source_type` is `BIGQUERY_TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TableSpec, + com.google.cloud.datacatalog.v1.TableSpec.Builder, + com.google.cloud.datacatalog.v1.TableSpecOrBuilder> + getTableSpecFieldBuilder() { + if (tableSpecBuilder_ == null) { + if (!(typeSpecCase_ == 3)) { + typeSpec_ = com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } + tableSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TableSpec, + com.google.cloud.datacatalog.v1.TableSpec.Builder, + com.google.cloud.datacatalog.v1.TableSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.TableSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 3; + onChanged(); + ; + return tableSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.BigQueryTableSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.BigQueryTableSpec) + private static final com.google.cloud.datacatalog.v1.BigQueryTableSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.BigQueryTableSpec(); + } + + public static com.google.cloud.datacatalog.v1.BigQueryTableSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryTableSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryTableSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.BigQueryTableSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpecOrBuilder.java new file mode 100644 index 00000000..5bf7abed --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/BigQueryTableSpecOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface BigQueryTableSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.BigQueryTableSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The table source type.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for tableSourceType. + */ + int getTableSourceTypeValue(); + /** + * + * + *
+   * Output only. The table source type.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TableSourceType table_source_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tableSourceType. + */ + com.google.cloud.datacatalog.v1.TableSourceType getTableSourceType(); + + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return Whether the viewSpec field is set. + */ + boolean hasViewSpec(); + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + * + * @return The viewSpec. + */ + com.google.cloud.datacatalog.v1.ViewSpec getViewSpec(); + /** + * + * + *
+   * Table view specification. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_VIEW`.
+   * 
+ * + * .google.cloud.datacatalog.v1.ViewSpec view_spec = 2; + */ + com.google.cloud.datacatalog.v1.ViewSpecOrBuilder getViewSpecOrBuilder(); + + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return Whether the tableSpec field is set. + */ + boolean hasTableSpec(); + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + * + * @return The tableSpec. + */ + com.google.cloud.datacatalog.v1.TableSpec getTableSpec(); + /** + * + * + *
+   * Spec of a BigQuery table. This field should only be populated if
+   * `table_source_type` is `BIGQUERY_TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.TableSpec table_spec = 3; + */ + com.google.cloud.datacatalog.v1.TableSpecOrBuilder getTableSpecOrBuilder(); + + public com.google.cloud.datacatalog.v1.BigQueryTableSpec.TypeSpecCase getTypeSpecCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java new file mode 100644 index 00000000..27f002ec --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java @@ -0,0 +1,1715 @@ +/* + * 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/cloud/datacatalog/v1/schema.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Representation of a column within a schema. Columns could be nested inside
+ * other columns.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ColumnSchema} + */ +public final class ColumnSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ColumnSchema) + ColumnSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColumnSchema.newBuilder() to construct. + private ColumnSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ColumnSchema() { + column_ = ""; + type_ = ""; + description_ = ""; + mode_ = ""; + subcolumns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ColumnSchema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ColumnSchema( + 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(); + + type_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mode_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + column_ = s; + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + subcolumns_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + subcolumns_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.ColumnSchema.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + subcolumns_ = java.util.Collections.unmodifiableList(subcolumns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_ColumnSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ColumnSchema.class, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder.class); + } + + public static final int COLUMN_FIELD_NUMBER = 6; + private volatile java.lang.Object column_; + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The column. + */ + public java.lang.String getColumn() { + java.lang.Object ref = column_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + column_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for column. + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + 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; + } + } + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Description of the column. Default value is an empty string.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+   * Optional. Description of the column. Default value is an empty string.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + 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 MODE_FIELD_NUMBER = 3; + private volatile java.lang.Object mode_; + /** + * + * + *
+   * Optional. A column's mode indicates whether the values in this column are required,
+   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+   * Default mode is `NULLABLE`.
+   * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A column's mode indicates whether the values in this column are required,
+   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+   * Default mode is `NULLABLE`.
+   * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCOLUMNS_FIELD_NUMBER = 7; + private java.util.List subcolumns_; + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getSubcolumnsList() { + return subcolumns_; + } + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSubcolumnsOrBuilderList() { + return subcolumns_; + } + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSubcolumnsCount() { + return subcolumns_.size(); + } + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema getSubcolumns(int index) { + return subcolumns_.get(index); + } + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index) { + return subcolumns_.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 (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getModeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mode_); + } + if (!getColumnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, column_); + } + for (int i = 0; i < subcolumns_.size(); i++) { + output.writeMessage(7, subcolumns_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getModeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mode_); + } + if (!getColumnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, column_); + } + for (int i = 0; i < subcolumns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, subcolumns_.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.cloud.datacatalog.v1.ColumnSchema)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ColumnSchema other = + (com.google.cloud.datacatalog.v1.ColumnSchema) obj; + + if (!getColumn().equals(other.getColumn())) return false; + if (!getType().equals(other.getType())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSubcolumnsList().equals(other.getSubcolumnsList())) return false; + if (!unknownFields.equals(other.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) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumn().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + if (getSubcolumnsCount() > 0) { + hash = (37 * hash) + SUBCOLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getSubcolumnsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ColumnSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Representation of a column within a schema. Columns could be nested inside
+   * other columns.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ColumnSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ColumnSchema) + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_ColumnSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ColumnSchema.class, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ColumnSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSubcolumnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + column_ = ""; + + type_ = ""; + + description_ = ""; + + mode_ = ""; + + if (subcolumnsBuilder_ == null) { + subcolumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + subcolumnsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ColumnSchema getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ColumnSchema build() { + com.google.cloud.datacatalog.v1.ColumnSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ColumnSchema buildPartial() { + com.google.cloud.datacatalog.v1.ColumnSchema result = + new com.google.cloud.datacatalog.v1.ColumnSchema(this); + int from_bitField0_ = bitField0_; + result.column_ = column_; + result.type_ = type_; + result.description_ = description_; + result.mode_ = mode_; + if (subcolumnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subcolumns_ = java.util.Collections.unmodifiableList(subcolumns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subcolumns_ = subcolumns_; + } else { + result.subcolumns_ = subcolumnsBuilder_.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.cloud.datacatalog.v1.ColumnSchema) { + return mergeFrom((com.google.cloud.datacatalog.v1.ColumnSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ColumnSchema other) { + if (other == com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance()) return this; + if (!other.getColumn().isEmpty()) { + column_ = other.column_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + onChanged(); + } + if (subcolumnsBuilder_ == null) { + if (!other.subcolumns_.isEmpty()) { + if (subcolumns_.isEmpty()) { + subcolumns_ = other.subcolumns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubcolumnsIsMutable(); + subcolumns_.addAll(other.subcolumns_); + } + onChanged(); + } + } else { + if (!other.subcolumns_.isEmpty()) { + if (subcolumnsBuilder_.isEmpty()) { + subcolumnsBuilder_.dispose(); + subcolumnsBuilder_ = null; + subcolumns_ = other.subcolumns_; + bitField0_ = (bitField0_ & ~0x00000001); + subcolumnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubcolumnsFieldBuilder() + : null; + } else { + subcolumnsBuilder_.addAllMessages(other.subcolumns_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ColumnSchema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.ColumnSchema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object column_ = ""; + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The column. + */ + public java.lang.String getColumn() { + java.lang.Object ref = column_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + column_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for column. + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + column_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + + column_ = getDefaultInstance().getColumn(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the column.
+     * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for column to set. + * @return This builder for chaining. + */ + public Builder setColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + column_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the column.
+     * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 description_ = ""; + /** + * + * + *
+     * Optional. Description of the column. Default value is an empty string.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Description of the column. Default value is an empty string.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Description of the column. Default value is an empty string.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Description of the column. Default value is an empty string.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the column. Default value is an empty string.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 mode_ = ""; + /** + * + * + *
+     * Optional. A column's mode indicates whether the values in this column are required,
+     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+     * Default mode is `NULLABLE`.
+     * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A column's mode indicates whether the values in this column are required,
+     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+     * Default mode is `NULLABLE`.
+     * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A column's mode indicates whether the values in this column are required,
+     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+     * Default mode is `NULLABLE`.
+     * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A column's mode indicates whether the values in this column are required,
+     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+     * Default mode is `NULLABLE`.
+     * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A column's mode indicates whether the values in this column are required,
+     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+     * Default mode is `NULLABLE`.
+     * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private java.util.List subcolumns_ = + java.util.Collections.emptyList(); + + private void ensureSubcolumnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subcolumns_ = + new java.util.ArrayList(subcolumns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder> + subcolumnsBuilder_; + + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getSubcolumnsList() { + if (subcolumnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subcolumns_); + } else { + return subcolumnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSubcolumnsCount() { + if (subcolumnsBuilder_ == null) { + return subcolumns_.size(); + } else { + return subcolumnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema getSubcolumns(int index) { + if (subcolumnsBuilder_ == null) { + return subcolumns_.get(index); + } else { + return subcolumnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubcolumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.set(index, value); + onChanged(); + } else { + subcolumnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubcolumns( + int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.set(index, builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubcolumns(com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.add(value); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubcolumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (subcolumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubcolumnsIsMutable(); + subcolumns_.add(index, value); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubcolumns( + com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.add(builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSubcolumns( + int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.add(index, builderForValue.build()); + onChanged(); + } else { + subcolumnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSubcolumns( + java.lang.Iterable values) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subcolumns_); + onChanged(); + } else { + subcolumnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSubcolumns() { + if (subcolumnsBuilder_ == null) { + subcolumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subcolumnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSubcolumns(int index) { + if (subcolumnsBuilder_ == null) { + ensureSubcolumnsIsMutable(); + subcolumns_.remove(index); + onChanged(); + } else { + subcolumnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder getSubcolumnsBuilder(int index) { + return getSubcolumnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index) { + if (subcolumnsBuilder_ == null) { + return subcolumns_.get(index); + } else { + return subcolumnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSubcolumnsOrBuilderList() { + if (subcolumnsBuilder_ != null) { + return subcolumnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subcolumns_); + } + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addSubcolumnsBuilder() { + return getSubcolumnsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addSubcolumnsBuilder(int index) { + return getSubcolumnsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSubcolumnsBuilderList() { + return getSubcolumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder> + getSubcolumnsFieldBuilder() { + if (subcolumnsBuilder_ == null) { + subcolumnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder>( + subcolumns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + subcolumns_ = null; + } + return subcolumnsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ColumnSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ColumnSchema) + private static final com.google.cloud.datacatalog.v1.ColumnSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ColumnSchema(); + } + + public static com.google.cloud.datacatalog.v1.ColumnSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColumnSchema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ColumnSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java new file mode 100644 index 00000000..b99c0470 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java @@ -0,0 +1,191 @@ +/* + * 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/cloud/datacatalog/v1/schema.proto + +package com.google.cloud.datacatalog.v1; + +public interface ColumnSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ColumnSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The column. + */ + java.lang.String getColumn(); + /** + * + * + *
+   * Required. Name of the column.
+   * 
+ * + * string column = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for column. + */ + com.google.protobuf.ByteString getColumnBytes(); + + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Required. Type of the column.
+   * 
+ * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Optional. Description of the column. Default value is an empty string.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the column. Default value is an empty string.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. A column's mode indicates whether the values in this column are required,
+   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+   * Default mode is `NULLABLE`.
+   * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mode. + */ + java.lang.String getMode(); + /** + * + * + *
+   * Optional. A column's mode indicates whether the values in this column are required,
+   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
+   * Default mode is `NULLABLE`.
+   * 
+ * + * string mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSubcolumnsList(); + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.v1.ColumnSchema getSubcolumns(int index); + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSubcolumnsCount(); + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSubcolumnsOrBuilderList(); + /** + * + * + *
+   * Optional. Schema of sub-columns. A column can have zero or more sub-columns.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema subcolumns = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getSubcolumnsOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java new file mode 100644 index 00000000..0baba65d --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java @@ -0,0 +1,52 @@ +/* + * 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/cloud/datacatalog/v1/common.proto + +package com.google.cloud.datacatalog.v1; + +public final class Common { + private Common() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + 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/cloud/datacatalog/v1/common.pro" + + "to\022\033google.cloud.datacatalog.v1*U\n\020Integ" + + "ratedSystem\022!\n\035INTEGRATED_SYSTEM_UNSPECI" + + "FIED\020\000\022\014\n\010BIGQUERY\020\001\022\020\n\014CLOUD_PUBSUB\020\002Bn" + + "\n\037com.google.cloud.datacatalog.v1P\001ZFgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/datacatalog/v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java new file mode 100644 index 00000000..2482c121 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java @@ -0,0 +1,1138 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateEntryGroupRequest} + */ +public final class CreateEntryGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateEntryGroupRequest) + CreateEntryGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntryGroupRequest.newBuilder() to construct. + private CreateEntryGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntryGroupRequest() { + parent_ = ""; + entryGroupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntryGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEntryGroupRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.EntryGroup.Builder subBuilder = null; + if (entryGroup_ != null) { + subBuilder = entryGroup_.toBuilder(); + } + entryGroup_ = + input.readMessage( + com.google.cloud.datacatalog.v1.EntryGroup.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entryGroup_); + entryGroup_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + entryGroupId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the project this entry group is in. Example:
+   * * projects/{project_id}/locations/{location}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * + * 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) { + 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. The name of the project this entry group is in. Example:
+   * * projects/{project_id}/locations/{location}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * + * 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 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 ENTRY_GROUP_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object entryGroupId_; + /** + * + * + *
+   * Required. The id of the entry group to create.
+   * The id must begin with a letter or underscore, contain only English
+   * letters, numbers and underscores, and be at most 64 characters.
+   * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryGroupId. + */ + public java.lang.String getEntryGroupId() { + java.lang.Object ref = entryGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the entry group to create.
+   * The id must begin with a letter or underscore, contain only English
+   * letters, numbers and underscores, and be at most 64 characters.
+   * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryGroupId. + */ + public com.google.protobuf.ByteString getEntryGroupIdBytes() { + java.lang.Object ref = entryGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entryGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTRY_GROUP_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.EntryGroup entryGroup_; + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return Whether the entryGroup field is set. + */ + public boolean hasEntryGroup() { + return entryGroup_ != null; + } + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return The entryGroup. + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup() { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder() { + return getEntryGroup(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entryGroup_ != null) { + output.writeMessage(2, getEntryGroup()); + } + if (!getEntryGroupIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryGroupId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entryGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEntryGroup()); + } + if (!getEntryGroupIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryGroupId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateEntryGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest other = + (com.google.cloud.datacatalog.v1.CreateEntryGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntryGroupId().equals(other.getEntryGroupId())) return false; + if (hasEntryGroup() != other.hasEntryGroup()) return false; + if (hasEntryGroup()) { + if (!getEntryGroup().equals(other.getEntryGroup())) return false; + } + if (!unknownFields.equals(other.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) + ENTRY_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntryGroupId().hashCode(); + if (hasEntryGroup()) { + hash = (37 * hash) + ENTRY_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getEntryGroup().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateEntryGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateEntryGroupRequest) + com.google.cloud.datacatalog.v1.CreateEntryGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + entryGroupId_ = ""; + + if (entryGroupBuilder_ == null) { + entryGroup_ = null; + } else { + entryGroup_ = null; + entryGroupBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryGroupRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryGroupRequest build() { + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryGroupRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest result = + new com.google.cloud.datacatalog.v1.CreateEntryGroupRequest(this); + result.parent_ = parent_; + result.entryGroupId_ = entryGroupId_; + if (entryGroupBuilder_ == null) { + result.entryGroup_ = entryGroup_; + } else { + result.entryGroup_ = entryGroupBuilder_.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.cloud.datacatalog.v1.CreateEntryGroupRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateEntryGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateEntryGroupRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreateEntryGroupRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getEntryGroupId().isEmpty()) { + entryGroupId_ = other.entryGroupId_; + onChanged(); + } + if (other.hasEntryGroup()) { + mergeEntryGroup(other.getEntryGroup()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateEntryGroupRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreateEntryGroupRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project this entry group is in. Example:
+     * * projects/{project_id}/locations/{location}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * + * 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. The name of the project this entry group is in. Example:
+     * * projects/{project_id}/locations/{location}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * + * 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. The name of the project this entry group is in. Example:
+     * * projects/{project_id}/locations/{location}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * + * 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. The name of the project this entry group is in. Example:
+     * * projects/{project_id}/locations/{location}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * + * 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. The name of the project this entry group is in. Example:
+     * * projects/{project_id}/locations/{location}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * + * 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 entryGroupId_ = ""; + /** + * + * + *
+     * Required. The id of the entry group to create.
+     * The id must begin with a letter or underscore, contain only English
+     * letters, numbers and underscores, and be at most 64 characters.
+     * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryGroupId. + */ + public java.lang.String getEntryGroupId() { + java.lang.Object ref = entryGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the entry group to create.
+     * The id must begin with a letter or underscore, contain only English
+     * letters, numbers and underscores, and be at most 64 characters.
+     * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryGroupId. + */ + public com.google.protobuf.ByteString getEntryGroupIdBytes() { + java.lang.Object ref = entryGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entryGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the entry group to create.
+     * The id must begin with a letter or underscore, contain only English
+     * letters, numbers and underscores, and be at most 64 characters.
+     * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entryGroupId to set. + * @return This builder for chaining. + */ + public Builder setEntryGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entryGroupId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the entry group to create.
+     * The id must begin with a letter or underscore, contain only English
+     * letters, numbers and underscores, and be at most 64 characters.
+     * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntryGroupId() { + + entryGroupId_ = getDefaultInstance().getEntryGroupId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the entry group to create.
+     * The id must begin with a letter or underscore, contain only English
+     * letters, numbers and underscores, and be at most 64 characters.
+     * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for entryGroupId to set. + * @return This builder for chaining. + */ + public Builder setEntryGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entryGroupId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.EntryGroup entryGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + entryGroupBuilder_; + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return Whether the entryGroup field is set. + */ + public boolean hasEntryGroup() { + return entryGroupBuilder_ != null || entryGroup_ != null; + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return The entryGroup. + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup() { + if (entryGroupBuilder_ == null) { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } else { + return entryGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public Builder setEntryGroup(com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entryGroup_ = value; + onChanged(); + } else { + entryGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public Builder setEntryGroup( + com.google.cloud.datacatalog.v1.EntryGroup.Builder builderForValue) { + if (entryGroupBuilder_ == null) { + entryGroup_ = builderForValue.build(); + onChanged(); + } else { + entryGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public Builder mergeEntryGroup(com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupBuilder_ == null) { + if (entryGroup_ != null) { + entryGroup_ = + com.google.cloud.datacatalog.v1.EntryGroup.newBuilder(entryGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + entryGroup_ = value; + } + onChanged(); + } else { + entryGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public Builder clearEntryGroup() { + if (entryGroupBuilder_ == null) { + entryGroup_ = null; + onChanged(); + } else { + entryGroup_ = null; + entryGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public com.google.cloud.datacatalog.v1.EntryGroup.Builder getEntryGroupBuilder() { + + onChanged(); + return getEntryGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder() { + if (entryGroupBuilder_ != null) { + return entryGroupBuilder_.getMessageOrBuilder(); + } else { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } + } + /** + * + * + *
+     * The entry group to create. Defaults to an empty entry group.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + getEntryGroupFieldBuilder() { + if (entryGroupBuilder_ == null) { + entryGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder>( + getEntryGroup(), getParentForChildren(), isClean()); + entryGroup_ = null; + } + return entryGroupBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateEntryGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateEntryGroupRequest) + private static final com.google.cloud.datacatalog.v1.CreateEntryGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateEntryGroupRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntryGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEntryGroupRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java new file mode 100644 index 00000000..61c25b0f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateEntryGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateEntryGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project this entry group is in. Example:
+   * * projects/{project_id}/locations/{location}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project this entry group is in. Example:
+   * * projects/{project_id}/locations/{location}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The id of the entry group to create.
+   * The id must begin with a letter or underscore, contain only English
+   * letters, numbers and underscores, and be at most 64 characters.
+   * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryGroupId. + */ + java.lang.String getEntryGroupId(); + /** + * + * + *
+   * Required. The id of the entry group to create.
+   * The id must begin with a letter or underscore, contain only English
+   * letters, numbers and underscores, and be at most 64 characters.
+   * 
+ * + * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryGroupId. + */ + com.google.protobuf.ByteString getEntryGroupIdBytes(); + + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return Whether the entryGroup field is set. + */ + boolean hasEntryGroup(); + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + * + * @return The entryGroup. + */ + com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup(); + /** + * + * + *
+   * The entry group to create. Defaults to an empty entry group.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 2; + */ + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java new file mode 100644 index 00000000..dc526970 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java @@ -0,0 +1,1128 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateEntryRequest} + */ +public final class CreateEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateEntryRequest) + CreateEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntryRequest.newBuilder() to construct. + private CreateEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntryRequest() { + parent_ = ""; + entryId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.Entry.Builder subBuilder = null; + if (entry_ != null) { + subBuilder = entry_.toBuilder(); + } + entry_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Entry.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entry_); + entry_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + entryId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateEntryRequest.class, + com.google.cloud.datacatalog.v1.CreateEntryRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the entry group this entry is in. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * 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) { + 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. The name of the entry group this entry is in. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * 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 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 ENTRY_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object entryId_; + /** + * + * + *
+   * Required. The id of the entry to create.
+   * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryId. + */ + public java.lang.String getEntryId() { + java.lang.Object ref = entryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the entry to create.
+   * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryId. + */ + public com.google.protobuf.ByteString getEntryIdBytes() { + java.lang.Object ref = entryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTRY_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.Entry entry_; + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + public boolean hasEntry() { + return entry_ != null; + } + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + public com.google.cloud.datacatalog.v1.Entry getEntry() { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { + return getEntry(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entry_ != null) { + output.writeMessage(2, getEntry()); + } + if (!getEntryIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entry_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEntry()); + } + if (!getEntryIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateEntryRequest other = + (com.google.cloud.datacatalog.v1.CreateEntryRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntryId().equals(other.getEntryId())) return false; + if (hasEntry() != other.hasEntry()) return false; + if (hasEntry()) { + if (!getEntry().equals(other.getEntry())) return false; + } + if (!unknownFields.equals(other.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) + ENTRY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntryId().hashCode(); + if (hasEntry()) { + hash = (37 * hash) + ENTRY_FIELD_NUMBER; + hash = (53 * hash) + getEntry().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.CreateEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateEntryRequest) + com.google.cloud.datacatalog.v1.CreateEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateEntryRequest.class, + com.google.cloud.datacatalog.v1.CreateEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + entryId_ = ""; + + if (entryBuilder_ == null) { + entry_ = null; + } else { + entry_ = null; + entryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryRequest build() { + com.google.cloud.datacatalog.v1.CreateEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateEntryRequest result = + new com.google.cloud.datacatalog.v1.CreateEntryRequest(this); + result.parent_ = parent_; + result.entryId_ = entryId_; + if (entryBuilder_ == null) { + result.entry_ = entry_; + } else { + result.entry_ = entryBuilder_.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.cloud.datacatalog.v1.CreateEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateEntryRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreateEntryRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getEntryId().isEmpty()) { + entryId_ = other.entryId_; + onChanged(); + } + if (other.hasEntry()) { + mergeEntry(other.getEntry()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreateEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the entry group this entry is in. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the entry group this entry is in. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the entry group this entry is in. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the entry group this entry is in. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the entry group this entry is in. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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 entryId_ = ""; + /** + * + * + *
+     * Required. The id of the entry to create.
+     * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryId. + */ + public java.lang.String getEntryId() { + java.lang.Object ref = entryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the entry to create.
+     * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryId. + */ + public com.google.protobuf.ByteString getEntryIdBytes() { + java.lang.Object ref = entryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the entry to create.
+     * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entryId to set. + * @return This builder for chaining. + */ + public Builder setEntryId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entryId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the entry to create.
+     * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntryId() { + + entryId_ = getDefaultInstance().getEntryId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the entry to create.
+     * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for entryId to set. + * @return This builder for chaining. + */ + public Builder setEntryIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entryId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.Entry entry_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + entryBuilder_; + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + public boolean hasEntry() { + return entryBuilder_ != null || entry_ != null; + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + public com.google.cloud.datacatalog.v1.Entry getEntry() { + if (entryBuilder_ == null) { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } else { + return entryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntry(com.google.cloud.datacatalog.v1.Entry value) { + if (entryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entry_ = value; + onChanged(); + } else { + entryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntry(com.google.cloud.datacatalog.v1.Entry.Builder builderForValue) { + if (entryBuilder_ == null) { + entry_ = builderForValue.build(); + onChanged(); + } else { + entryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEntry(com.google.cloud.datacatalog.v1.Entry value) { + if (entryBuilder_ == null) { + if (entry_ != null) { + entry_ = + com.google.cloud.datacatalog.v1.Entry.newBuilder(entry_) + .mergeFrom(value) + .buildPartial(); + } else { + entry_ = value; + } + onChanged(); + } else { + entryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntry() { + if (entryBuilder_ == null) { + entry_ = null; + onChanged(); + } else { + entry_ = null; + entryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.Entry.Builder getEntryBuilder() { + + onChanged(); + return getEntryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { + if (entryBuilder_ != null) { + return entryBuilder_.getMessageOrBuilder(); + } else { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } + } + /** + * + * + *
+     * Required. The entry to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + getEntryFieldBuilder() { + if (entryBuilder_ == null) { + entryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder>( + getEntry(), getParentForChildren(), isClean()); + entry_ = null; + } + return entryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateEntryRequest) + private static final com.google.cloud.datacatalog.v1.CreateEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateEntryRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java new file mode 100644 index 00000000..4fc0b37d --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry group this entry is in. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the entry group this entry is in. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The id of the entry to create.
+   * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entryId. + */ + java.lang.String getEntryId(); + /** + * + * + *
+   * Required. The id of the entry to create.
+   * 
+ * + * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entryId. + */ + com.google.protobuf.ByteString getEntryIdBytes(); + + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + boolean hasEntry(); + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + com.google.cloud.datacatalog.v1.Entry getEntry(); + /** + * + * + *
+   * Required. The entry to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java new file mode 100644 index 00000000..f554ba95 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java @@ -0,0 +1,955 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagRequest} + */ +public final class CreateTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateTagRequest) + CreateTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTagRequest.newBuilder() to construct. + private CreateTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTagRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.Tag.Builder subBuilder = null; + if (tag_ != null) { + subBuilder = tag_.toBuilder(); + } + tag_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Tag.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tag_); + tag_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagRequest.class, + com.google.cloud.datacatalog.v1.CreateTagRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the resource to attach this tag to. Tags can be attached to
+   * Entries. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Tag and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * 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) { + 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. The name of the resource to attach this tag to. Tags can be attached to
+   * Entries. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Tag and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * 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 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 TAG_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.Tag tag_; + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + public boolean hasTag() { + return tag_ != null; + } + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + public com.google.cloud.datacatalog.v1.Tag getTag() { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { + return getTag(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (tag_ != null) { + output.writeMessage(2, getTag()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (tag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTag()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateTagRequest other = + (com.google.cloud.datacatalog.v1.CreateTagRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTag() != other.hasTag()) return false; + if (hasTag()) { + if (!getTag().equals(other.getTag())) return false; + } + if (!unknownFields.equals(other.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 (hasTag()) { + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.CreateTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateTagRequest) + com.google.cloud.datacatalog.v1.CreateTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagRequest.class, + com.google.cloud.datacatalog.v1.CreateTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (tagBuilder_ == null) { + tag_ = null; + } else { + tag_ = null; + tagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagRequest build() { + com.google.cloud.datacatalog.v1.CreateTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateTagRequest result = + new com.google.cloud.datacatalog.v1.CreateTagRequest(this); + result.parent_ = parent_; + if (tagBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = tagBuilder_.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.cloud.datacatalog.v1.CreateTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreateTagRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTag()) { + mergeTag(other.getTag()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.CreateTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the resource to attach this tag to. Tags can be attached to
+     * Entries. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Tag and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the resource to attach this tag to. Tags can be attached to
+     * Entries. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Tag and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the resource to attach this tag to. Tags can be attached to
+     * Entries. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Tag and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the resource to attach this tag to. Tags can be attached to
+     * Entries. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Tag and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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. The name of the resource to attach this tag to. Tags can be attached to
+     * Entries. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Tag and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * + * 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.cloud.datacatalog.v1.Tag tag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + tagBuilder_; + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + public boolean hasTag() { + return tagBuilder_ != null || tag_ != null; + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + public com.google.cloud.datacatalog.v1.Tag getTag() { + if (tagBuilder_ == null) { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } else { + return tagBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTag(com.google.cloud.datacatalog.v1.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + tagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTag(com.google.cloud.datacatalog.v1.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + tagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTag(com.google.cloud.datacatalog.v1.Tag value) { + if (tagBuilder_ == null) { + if (tag_ != null) { + tag_ = + com.google.cloud.datacatalog.v1.Tag.newBuilder(tag_).mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + tagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTag() { + if (tagBuilder_ == null) { + tag_ = null; + onChanged(); + } else { + tag_ = null; + tagBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.Tag.Builder getTagBuilder() { + + onChanged(); + return getTagFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { + if (tagBuilder_ != null) { + return tagBuilder_.getMessageOrBuilder(); + } else { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } + } + /** + * + * + *
+     * Required. The tag to create.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + getTagFieldBuilder() { + if (tagBuilder_ == null) { + tagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder>( + getTag(), getParentForChildren(), isClean()); + tag_ = null; + } + return tagBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateTagRequest) + private static final com.google.cloud.datacatalog.v1.CreateTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java new file mode 100644 index 00000000..89f3574b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the resource to attach this tag to. Tags can be attached to
+   * Entries. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Tag and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the resource to attach this tag to. Tags can be attached to
+   * Entries. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Tag and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + boolean hasTag(); + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + com.google.cloud.datacatalog.v1.Tag getTag(); + /** + * + * + *
+   * Required. The tag to create.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java new file mode 100644 index 00000000..ca528658 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java @@ -0,0 +1,1188 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} + */ +public final class CreateTagTemplateFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + CreateTagTemplateFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTagTemplateFieldRequest.newBuilder() to construct. + private CreateTagTemplateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTagTemplateFieldRequest() { + parent_ = ""; + tagTemplateFieldId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTagTemplateFieldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTagTemplateFieldRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + tagTemplateFieldId_ = s; + break; + } + case 26: + { + com.google.cloud.datacatalog.v1.TagTemplateField.Builder subBuilder = null; + if (tagTemplateField_ != null) { + subBuilder = tagTemplateField_.toBuilder(); + } + tagTemplateField_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TagTemplateField.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tagTemplateField_); + tagTemplateField_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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) { + 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. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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 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 TAG_TEMPLATE_FIELD_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object tagTemplateFieldId_; + /** + * + * + *
+   * Required. The ID of the tag template field to create.
+   * Field ids can contain letters (both uppercase and lowercase), numbers
+   * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+   * character long and at most 128 characters long. Field IDs must also be
+   * unique within their template.
+   * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateFieldId. + */ + public java.lang.String getTagTemplateFieldId() { + java.lang.Object ref = tagTemplateFieldId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagTemplateFieldId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of the tag template field to create.
+   * Field ids can contain letters (both uppercase and lowercase), numbers
+   * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+   * character long and at most 128 characters long. Field IDs must also be
+   * unique within their template.
+   * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateFieldId. + */ + public com.google.protobuf.ByteString getTagTemplateFieldIdBytes() { + java.lang.Object ref = tagTemplateFieldId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagTemplateFieldId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_TEMPLATE_FIELD_FIELD_NUMBER = 3; + private com.google.cloud.datacatalog.v1.TagTemplateField tagTemplateField_; + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + public boolean hasTagTemplateField() { + return tagTemplateField_ != null; + } + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField() { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder getTagTemplateFieldOrBuilder() { + return getTagTemplateField(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getTagTemplateFieldIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tagTemplateFieldId_); + } + if (tagTemplateField_ != null) { + output.writeMessage(3, getTagTemplateField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getTagTemplateFieldIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tagTemplateFieldId_); + } + if (tagTemplateField_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTagTemplateField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest other = + (com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTagTemplateFieldId().equals(other.getTagTemplateFieldId())) return false; + if (hasTagTemplateField() != other.hasTagTemplateField()) return false; + if (hasTagTemplateField()) { + if (!getTagTemplateField().equals(other.getTagTemplateField())) return false; + } + if (!unknownFields.equals(other.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) + TAG_TEMPLATE_FIELD_ID_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplateFieldId().hashCode(); + if (hasTagTemplateField()) { + hash = (37 * hash) + TAG_TEMPLATE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplateField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + tagTemplateFieldId_ = ""; + + if (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = null; + } else { + tagTemplateField_ = null; + tagTemplateFieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest build() { + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest result = + new com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest(this); + result.parent_ = parent_; + result.tagTemplateFieldId_ = tagTemplateFieldId_; + if (tagTemplateFieldBuilder_ == null) { + result.tagTemplateField_ = tagTemplateField_; + } else { + result.tagTemplateField_ = tagTemplateFieldBuilder_.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.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest other) { + if (other + == com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getTagTemplateFieldId().isEmpty()) { + tagTemplateFieldId_ = other.tagTemplateFieldId_; + onChanged(); + } + if (other.hasTagTemplateField()) { + mergeTagTemplateField(other.getTagTemplateField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tagTemplateFieldId_ = ""; + /** + * + * + *
+     * Required. The ID of the tag template field to create.
+     * Field ids can contain letters (both uppercase and lowercase), numbers
+     * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+     * character long and at most 128 characters long. Field IDs must also be
+     * unique within their template.
+     * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateFieldId. + */ + public java.lang.String getTagTemplateFieldId() { + java.lang.Object ref = tagTemplateFieldId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagTemplateFieldId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of the tag template field to create.
+     * Field ids can contain letters (both uppercase and lowercase), numbers
+     * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+     * character long and at most 128 characters long. Field IDs must also be
+     * unique within their template.
+     * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateFieldId. + */ + public com.google.protobuf.ByteString getTagTemplateFieldIdBytes() { + java.lang.Object ref = tagTemplateFieldId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagTemplateFieldId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of the tag template field to create.
+     * Field ids can contain letters (both uppercase and lowercase), numbers
+     * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+     * character long and at most 128 characters long. Field IDs must also be
+     * unique within their template.
+     * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tagTemplateFieldId to set. + * @return This builder for chaining. + */ + public Builder setTagTemplateFieldId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tagTemplateFieldId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the tag template field to create.
+     * Field ids can contain letters (both uppercase and lowercase), numbers
+     * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+     * character long and at most 128 characters long. Field IDs must also be
+     * unique within their template.
+     * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTagTemplateFieldId() { + + tagTemplateFieldId_ = getDefaultInstance().getTagTemplateFieldId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of the tag template field to create.
+     * Field ids can contain letters (both uppercase and lowercase), numbers
+     * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+     * character long and at most 128 characters long. Field IDs must also be
+     * unique within their template.
+     * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tagTemplateFieldId to set. + * @return This builder for chaining. + */ + public Builder setTagTemplateFieldIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tagTemplateFieldId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.TagTemplateField tagTemplateField_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder> + tagTemplateFieldBuilder_; + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + public boolean hasTagTemplateField() { + return tagTemplateFieldBuilder_ != null || tagTemplateField_ != null; + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField() { + if (tagTemplateFieldBuilder_ == null) { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } else { + return tagTemplateFieldBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplateField(com.google.cloud.datacatalog.v1.TagTemplateField value) { + if (tagTemplateFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tagTemplateField_ = value; + onChanged(); + } else { + tagTemplateFieldBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplateField( + com.google.cloud.datacatalog.v1.TagTemplateField.Builder builderForValue) { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = builderForValue.build(); + onChanged(); + } else { + tagTemplateFieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTagTemplateField(com.google.cloud.datacatalog.v1.TagTemplateField value) { + if (tagTemplateFieldBuilder_ == null) { + if (tagTemplateField_ != null) { + tagTemplateField_ = + com.google.cloud.datacatalog.v1.TagTemplateField.newBuilder(tagTemplateField_) + .mergeFrom(value) + .buildPartial(); + } else { + tagTemplateField_ = value; + } + onChanged(); + } else { + tagTemplateFieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTagTemplateField() { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = null; + onChanged(); + } else { + tagTemplateField_ = null; + tagTemplateFieldBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField.Builder getTagTemplateFieldBuilder() { + + onChanged(); + return getTagTemplateFieldFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder + getTagTemplateFieldOrBuilder() { + if (tagTemplateFieldBuilder_ != null) { + return tagTemplateFieldBuilder_.getMessageOrBuilder(); + } else { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } + } + /** + * + * + *
+     * Required. The tag template field to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder> + getTagTemplateFieldFieldBuilder() { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateFieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder>( + getTagTemplateField(), getParentForChildren(), isClean()); + tagTemplateField_ = null; + } + return tagTemplateFieldBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + private static final com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTagTemplateFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTagTemplateFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java new file mode 100644 index 00000000..8e2dc52d --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateTagTemplateFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID of the tag template field to create.
+   * Field ids can contain letters (both uppercase and lowercase), numbers
+   * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+   * character long and at most 128 characters long. Field IDs must also be
+   * unique within their template.
+   * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateFieldId. + */ + java.lang.String getTagTemplateFieldId(); + /** + * + * + *
+   * Required. The ID of the tag template field to create.
+   * Field ids can contain letters (both uppercase and lowercase), numbers
+   * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
+   * character long and at most 128 characters long. Field IDs must also be
+   * unique within their template.
+   * 
+ * + * string tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateFieldId. + */ + com.google.protobuf.ByteString getTagTemplateFieldIdBytes(); + + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + boolean hasTagTemplateField(); + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField(); + /** + * + * + *
+   * Required. The tag template field to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder getTagTemplateFieldOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java new file mode 100644 index 00000000..f0c757e6 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java @@ -0,0 +1,1155 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagTemplateRequest} + */ +public final class CreateTagTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateTagTemplateRequest) + CreateTagTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTagTemplateRequest.newBuilder() to construct. + private CreateTagTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTagTemplateRequest() { + parent_ = ""; + tagTemplateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTagTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTagTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.TagTemplate.Builder subBuilder = null; + if (tagTemplate_ != null) { + subBuilder = tagTemplate_.toBuilder(); + } + tagTemplate_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TagTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tagTemplate_); + tagTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + tagTemplateId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1
+   * 
+ * + * + * 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) { + 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. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1
+   * 
+ * + * + * 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 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 TAG_TEMPLATE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object tagTemplateId_; + /** + * + * + *
+   * Required. The id of the tag template to create.
+   * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateId. + */ + public java.lang.String getTagTemplateId() { + java.lang.Object ref = tagTemplateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagTemplateId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the tag template to create.
+   * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateId. + */ + public com.google.protobuf.ByteString getTagTemplateIdBytes() { + java.lang.Object ref = tagTemplateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_TEMPLATE_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.TagTemplate tagTemplate_; + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + public boolean hasTagTemplate() { + return tagTemplate_ != null; + } + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + public com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate() { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder() { + return getTagTemplate(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (tagTemplate_ != null) { + output.writeMessage(2, getTagTemplate()); + } + if (!getTagTemplateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagTemplateId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (tagTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTagTemplate()); + } + if (!getTagTemplateIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tagTemplateId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateTagTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest other = + (com.google.cloud.datacatalog.v1.CreateTagTemplateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTagTemplateId().equals(other.getTagTemplateId())) return false; + if (hasTagTemplate() != other.hasTagTemplate()) return false; + if (hasTagTemplate()) { + if (!getTagTemplate().equals(other.getTagTemplate())) return false; + } + if (!unknownFields.equals(other.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) + TAG_TEMPLATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplateId().hashCode(); + if (hasTagTemplate()) { + hash = (37 * hash) + TAG_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTagTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateTagTemplateRequest) + com.google.cloud.datacatalog.v1.CreateTagTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + tagTemplateId_ = ""; + + if (tagTemplateBuilder_ == null) { + tagTemplate_ = null; + } else { + tagTemplate_ = null; + tagTemplateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateRequest build() { + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest result = + new com.google.cloud.datacatalog.v1.CreateTagTemplateRequest(this); + result.parent_ = parent_; + result.tagTemplateId_ = tagTemplateId_; + if (tagTemplateBuilder_ == null) { + result.tagTemplate_ = tagTemplate_; + } else { + result.tagTemplate_ = tagTemplateBuilder_.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.cloud.datacatalog.v1.CreateTagTemplateRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateTagTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateTagTemplateRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreateTagTemplateRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getTagTemplateId().isEmpty()) { + tagTemplateId_ = other.tagTemplateId_; + onChanged(); + } + if (other.hasTagTemplate()) { + mergeTagTemplate(other.getTagTemplate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateTagTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreateTagTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1
+     * 
+ * + * + * 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. The name of the project and the template location
+     * [region](/compute/docs/regions-zones/#available).
+     * NOTE: Currently, only the `us-central1 region` is supported.
+     * Example:
+     * * projects/{project_id}/locations/us-central1
+     * 
+ * + * + * 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 tagTemplateId_ = ""; + /** + * + * + *
+     * Required. The id of the tag template to create.
+     * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateId. + */ + public java.lang.String getTagTemplateId() { + java.lang.Object ref = tagTemplateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagTemplateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the tag template to create.
+     * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateId. + */ + public com.google.protobuf.ByteString getTagTemplateIdBytes() { + java.lang.Object ref = tagTemplateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagTemplateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the tag template to create.
+     * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tagTemplateId to set. + * @return This builder for chaining. + */ + public Builder setTagTemplateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tagTemplateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the tag template to create.
+     * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTagTemplateId() { + + tagTemplateId_ = getDefaultInstance().getTagTemplateId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the tag template to create.
+     * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tagTemplateId to set. + * @return This builder for chaining. + */ + public Builder setTagTemplateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tagTemplateId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.TagTemplate tagTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder> + tagTemplateBuilder_; + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + public boolean hasTagTemplate() { + return tagTemplateBuilder_ != null || tagTemplate_ != null; + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + public com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate() { + if (tagTemplateBuilder_ == null) { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } else { + return tagTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplate(com.google.cloud.datacatalog.v1.TagTemplate value) { + if (tagTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tagTemplate_ = value; + onChanged(); + } else { + tagTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplate( + com.google.cloud.datacatalog.v1.TagTemplate.Builder builderForValue) { + if (tagTemplateBuilder_ == null) { + tagTemplate_ = builderForValue.build(); + onChanged(); + } else { + tagTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTagTemplate(com.google.cloud.datacatalog.v1.TagTemplate value) { + if (tagTemplateBuilder_ == null) { + if (tagTemplate_ != null) { + tagTemplate_ = + com.google.cloud.datacatalog.v1.TagTemplate.newBuilder(tagTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + tagTemplate_ = value; + } + onChanged(); + } else { + tagTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTagTemplate() { + if (tagTemplateBuilder_ == null) { + tagTemplate_ = null; + onChanged(); + } else { + tagTemplate_ = null; + tagTemplateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplate.Builder getTagTemplateBuilder() { + + onChanged(); + return getTagTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder() { + if (tagTemplateBuilder_ != null) { + return tagTemplateBuilder_.getMessageOrBuilder(); + } else { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } + } + /** + * + * + *
+     * Required. The tag template to create.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder> + getTagTemplateFieldBuilder() { + if (tagTemplateBuilder_ == null) { + tagTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder>( + getTagTemplate(), getParentForChildren(), isClean()); + tagTemplate_ = null; + } + return tagTemplateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateTagTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateTagTemplateRequest) + private static final com.google.cloud.datacatalog.v1.CreateTagTemplateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateTagTemplateRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateTagTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTagTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTagTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTagTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java new file mode 100644 index 00000000..c1a28179 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateTagTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateTagTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project and the template location
+   * [region](/compute/docs/regions-zones/#available).
+   * NOTE: Currently, only the `us-central1 region` is supported.
+   * Example:
+   * * projects/{project_id}/locations/us-central1
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The id of the tag template to create.
+   * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tagTemplateId. + */ + java.lang.String getTagTemplateId(); + /** + * + * + *
+   * Required. The id of the tag template to create.
+   * 
+ * + * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tagTemplateId. + */ + com.google.protobuf.ByteString getTagTemplateIdBytes(); + + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + boolean hasTagTemplate(); + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate(); + /** + * + * + *
+   * Required. The tag template to create.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java new file mode 100644 index 00000000..b56cf89e --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java @@ -0,0 +1,774 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public final class Datacatalog { + private Datacatalog() {} + + 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_cloud_datacatalog_v1_SearchCatalogRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GetEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_Entry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_Entry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_EntryGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListTagsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListTagsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_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/cloud/datacatalog/v1/datacatalo" + + "g.proto\022\033google.cloud.datacatalog.v1\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032(google/" + + "cloud/datacatalog/v1/common.proto\0322googl" + + "e/cloud/datacatalog/v1/gcs_fileset_spec." + + "proto\032(google/cloud/datacatalog/v1/schem" + + "a.proto\032(google/cloud/datacatalog/v1/sea" + + "rch.proto\032,google/cloud/datacatalog/v1/t" + + "able_spec.proto\032&google/cloud/datacatalo" + + "g/v1/tags.proto\032,google/cloud/datacatalo" + + "g/v1/timestamps.proto\032\036google/iam/v1/iam" + + "_policy.proto\032\032google/iam/v1/policy.prot" + + "o\032\033google/protobuf/empty.proto\032 google/p" + + "rotobuf/field_mask.proto\"\231\002\n\024SearchCatal" + + "ogRequest\022K\n\005scope\030\006 \001(\01327.google.cloud." + + "datacatalog.v1.SearchCatalogRequest.Scop" + + "eB\003\340A\002\022\022\n\005query\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030" + + "\002 \001(\005\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\020\n\010order_" + + "by\030\005 \001(\t\032b\n\005Scope\022\027\n\017include_org_ids\030\002 \003" + + "(\t\022\033\n\023include_project_ids\030\003 \003(\t\022#\n\033inclu" + + "de_gcp_public_datasets\030\007 \001(\010\"s\n\025SearchCa" + + "talogResponse\022A\n\007results\030\001 \003(\01320.google." + + "cloud.datacatalog.v1.SearchCatalogResult" + + "\022\027\n\017next_page_token\030\003 \001(\t\"\263\001\n\027CreateEntr" + + "yGroupRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%d" + + "atacatalog.googleapis.com/EntryGroup\022\033\n\016" + + "entry_group_id\030\003 \001(\tB\003\340A\002\022<\n\013entry_group" + + "\030\002 \001(\0132\'.google.cloud.datacatalog.v1.Ent" + + "ryGroup\"\215\001\n\027UpdateEntryGroupRequest\022A\n\013e" + + "ntry_group\030\001 \001(\0132\'.google.cloud.datacata" + + "log.v1.EntryGroupB\003\340A\002\022/\n\013update_mask\030\002 " + + "\001(\0132\032.google.protobuf.FieldMask\"\202\001\n\024GetE" + + "ntryGroupRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%" + + "datacatalog.googleapis.com/EntryGroup\022-\n" + + "\tread_mask\030\002 \001(\0132\032.google.protobuf.Field" + + "Mask\"j\n\027DeleteEntryGroupRequest\022;\n\004name\030" + + "\001 \001(\tB-\340A\002\372A\'\n%datacatalog.googleapis.co" + + "m/EntryGroup\022\022\n\005force\030\002 \001(\010B\003\340A\001\"\210\001\n\026Lis" + + "tEntryGroupsRequest\022=\n\006parent\030\001 \001(\tB-\340A\002" + + "\372A\'\n%datacatalog.googleapis.com/EntryGro" + + "up\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" + + "\030\003 \001(\tB\003\340A\001\"q\n\027ListEntryGroupsResponse\022=" + + "\n\014entry_groups\030\001 \003(\0132\'.google.cloud.data" + + "catalog.v1.EntryGroup\022\027\n\017next_page_token" + + "\030\002 \001(\t\"\242\001\n\022CreateEntryRequest\022=\n\006parent\030" + + "\001 \001(\tB-\340A\002\372A\'\n%datacatalog.googleapis.co" + + "m/EntryGroup\022\025\n\010entry_id\030\003 \001(\tB\003\340A\002\0226\n\005e" + + "ntry\030\002 \001(\0132\".google.cloud.datacatalog.v1" + + ".EntryB\003\340A\002\"}\n\022UpdateEntryRequest\0226\n\005ent" + + "ry\030\001 \001(\0132\".google.cloud.datacatalog.v1.E" + + "ntryB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMask\"L\n\022DeleteEntryRequest" + + "\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n datacatalog.goog" + + "leapis.com/Entry\"I\n\017GetEntryRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n datacatalog.googleapi" + + "s.com/Entry\"V\n\022LookupEntryRequest\022\031\n\017lin" + + "ked_resource\030\001 \001(\tH\000\022\026\n\014sql_resource\030\003 \001" + + "(\tH\000B\r\n\013target_name\"\347\006\n\005Entry\0228\n\004name\030\001 " + + "\001(\tB*\372A\'\n%datacatalog.googleapis.com/Ent" + + "ryGroup\022\027\n\017linked_resource\030\t \001(\t\0226\n\004type" + + "\030\002 \001(\0162&.google.cloud.datacatalog.v1.Ent" + + "ryTypeH\000\022\035\n\023user_specified_type\030\020 \001(\tH\000\022" + + "O\n\021integrated_system\030\021 \001(\0162-.google.clou" + + "d.datacatalog.v1.IntegratedSystemB\003\340A\003H\001" + + "\022\037\n\025user_specified_system\030\022 \001(\tH\001\022G\n\020gcs" + + "_fileset_spec\030\006 \001(\0132+.google.cloud.datac" + + "atalog.v1.GcsFilesetSpecH\002\022M\n\023bigquery_t" + + "able_spec\030\014 \001(\0132..google.cloud.datacatal" + + "og.v1.BigQueryTableSpecH\002\022Z\n\032bigquery_da" + + "te_sharded_spec\030\017 \001(\01324.google.cloud.dat" + + "acatalog.v1.BigQueryDateShardedSpecH\002\022\024\n" + + "\014display_name\030\003 \001(\t\022\023\n\013description\030\004 \001(\t" + + "\0223\n\006schema\030\005 \001(\0132#.google.cloud.datacata" + + "log.v1.Schema\022O\n\030source_system_timestamp" + + "s\030\007 \001(\0132-.google.cloud.datacatalog.v1.Sy" + + "stemTimestamps:x\352Au\n datacatalog.googlea" + + "pis.com/Entry\022Qprojects/{project}/locati" + + "ons/{location}/entryGroups/{entry_group}" + + "/entries/{entry}B\014\n\nentry_typeB\010\n\006system" + + "B\013\n\ttype_spec\"\211\002\n\nEntryGroup\022\014\n\004name\030\001 \001" + + "(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030" + + "\003 \001(\t\022S\n\027data_catalog_timestamps\030\004 \001(\0132-" + + ".google.cloud.datacatalog.v1.SystemTimes" + + "tampsB\003\340A\003:m\352Aj\n%datacatalog.googleapis." + + "com/EntryGroup\022Aprojects/{project}/locat" + + "ions/{location}/entryGroups/{entry_group" + + "}\"\275\001\n\030CreateTagTemplateRequest\022>\n\006parent" + + "\030\001 \001(\tB.\340A\002\372A(\022&datacatalog.googleapis.c" + + "om/TagTemplate\022\034\n\017tag_template_id\030\003 \001(\tB" + + "\003\340A\002\022C\n\014tag_template\030\002 \001(\0132(.google.clou" + + "d.datacatalog.v1.TagTemplateB\003\340A\002\"U\n\025Get" + + "TagTemplateRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(" + + "\n&datacatalog.googleapis.com/TagTemplate" + + "\"\220\001\n\030UpdateTagTemplateRequest\022C\n\014tag_tem" + + "plate\030\001 \001(\0132(.google.cloud.datacatalog.v" + + "1.TagTemplateB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMask\"l\n\030DeleteTag" + + "TemplateRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&d" + + "atacatalog.googleapis.com/TagTemplate\022\022\n" + + "\005force\030\002 \001(\010B\003\340A\002\"~\n\020CreateTagRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A \n\036datacatalog.googl" + + "eapis.com/Tag\0222\n\003tag\030\002 \001(\0132 .google.clou" + + "d.datacatalog.v1.TagB\003\340A\002\"w\n\020UpdateTagRe" + + "quest\0222\n\003tag\030\001 \001(\0132 .google.cloud.dataca" + + "talog.v1.TagB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMask\"H\n\020DeleteTagR" + + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \022\036datacatalo" + + "g.googleapis.com/Tag\"\323\001\n\035CreateTagTempla" + + "teFieldRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(\n&" + + "datacatalog.googleapis.com/TagTemplate\022\"" + + "\n\025tag_template_field_id\030\002 \001(\tB\003\340A\002\022N\n\022ta" + + "g_template_field\030\003 \001(\0132-.google.cloud.da" + + "tacatalog.v1.TagTemplateFieldB\003\340A\002\"\350\001\n\035U" + + "pdateTagTemplateFieldRequest\022A\n\004name\030\001 \001" + + "(\tB3\340A\002\372A-\n+datacatalog.googleapis.com/T" + + "agTemplateField\022N\n\022tag_template_field\030\002 " + + "\001(\0132-.google.cloud.datacatalog.v1.TagTem" + + "plateFieldB\003\340A\002\0224\n\013update_mask\030\003 \001(\0132\032.g" + + "oogle.protobuf.FieldMaskB\003\340A\001\"\212\001\n\035Rename" + + "TagTemplateFieldRequest\022A\n\004name\030\001 \001(\tB3\340" + + "A\002\372A-\n+datacatalog.googleapis.com/TagTem" + + "plateField\022&\n\031new_tag_template_field_id\030" + + "\002 \001(\tB\003\340A\002\"v\n\035DeleteTagTemplateFieldRequ" + + "est\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+datacatalog.g" + + "oogleapis.com/TagTemplateField\022\022\n\005force\030" + + "\002 \001(\010B\003\340A\002\"p\n\017ListTagsRequest\0226\n\006parent\030" + + "\001 \001(\tB&\340A\002\372A \022\036datacatalog.googleapis.co" + + "m/Tag\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\"[\n\020ListTagsResponse\022.\n\004tags\030\001 \003(\0132 " + + ".google.cloud.datacatalog.v1.Tag\022\027\n\017next" + + "_page_token\030\002 \001(\t\"\251\001\n\022ListEntriesRequest" + + "\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%datacatalog.go" + + "ogleapis.com/EntryGroup\022\021\n\tpage_size\030\002 \001" + + "(\005\022\022\n\npage_token\030\003 \001(\t\022-\n\tread_mask\030\004 \001(" + + "\0132\032.google.protobuf.FieldMask\"c\n\023ListEnt" + + "riesResponse\0223\n\007entries\030\001 \003(\0132\".google.c" + + "loud.datacatalog.v1.Entry\022\027\n\017next_page_t" + + "oken\030\002 \001(\t*[\n\tEntryType\022\032\n\026ENTRY_TYPE_UN" + + "SPECIFIED\020\000\022\t\n\005TABLE\020\002\022\t\n\005MODEL\020\005\022\017\n\013DAT" + + "A_STREAM\020\003\022\013\n\007FILESET\020\0042\220/\n\013DataCatalog\022" + + "\243\001\n\rSearchCatalog\0221.google.cloud.datacat" + + "alog.v1.SearchCatalogRequest\0322.google.cl" + + "oud.datacatalog.v1.SearchCatalogResponse" + + "\"+\202\323\344\223\002\027\"\022/v1/catalog:search:\001*\332A\013scope," + + "query\022\333\001\n\020CreateEntryGroup\0224.google.clou" + + "d.datacatalog.v1.CreateEntryGroupRequest" + + "\032\'.google.cloud.datacatalog.v1.EntryGrou" + + "p\"h\202\323\344\223\002>\"//v1/{parent=projects/*/locati" + + "ons/*}/entryGroups:\013entry_group\332A!parent" + + ",entry_group_id,entry_group\022\274\001\n\rGetEntry" + + "Group\0221.google.cloud.datacatalog.v1.GetE" + + "ntryGroupRequest\032\'.google.cloud.datacata" + + "log.v1.EntryGroup\"O\202\323\344\223\0021\022//v1/{name=pro" + + "jects/*/locations/*/entryGroups/*}\332A\004nam" + + "e\332A\016name,read_mask\022\353\001\n\020UpdateEntryGroup\022" + + "4.google.cloud.datacatalog.v1.UpdateEntr" + + "yGroupRequest\032\'.google.cloud.datacatalog" + + ".v1.EntryGroup\"x\202\323\344\223\002J2;/v1/{entry_group" + + ".name=projects/*/locations/*/entryGroups" + + "/*}:\013entry_group\332A\013entry_group\332A\027entry_g" + + "roup,update_mask\022\240\001\n\020DeleteEntryGroup\0224." + + "google.cloud.datacatalog.v1.DeleteEntryG" + + "roupRequest\032\026.google.protobuf.Empty\">\202\323\344" + + "\223\0021*//v1/{name=projects/*/locations/*/en" + + "tryGroups/*}\332A\004name\022\276\001\n\017ListEntryGroups\022" + + "3.google.cloud.datacatalog.v1.ListEntryG" + + "roupsRequest\0324.google.cloud.datacatalog." + + "v1.ListEntryGroupsResponse\"@\202\323\344\223\0021\022//v1/" + + "{parent=projects/*/locations/*}/entryGro" + + "ups\332A\006parent\022\304\001\n\013CreateEntry\022/.google.cl" + + "oud.datacatalog.v1.CreateEntryRequest\032\"." + + "google.cloud.datacatalog.v1.Entry\"`\202\323\344\223\002" + + "B\"9/v1/{parent=projects/*/locations/*/en" + + "tryGroups/*}/entries:\005entry\332A\025parent,ent" + + "ry_id,entry\022\316\001\n\013UpdateEntry\022/.google.clo" + + "ud.datacatalog.v1.UpdateEntryRequest\032\".g" + + "oogle.cloud.datacatalog.v1.Entry\"j\202\323\344\223\002H" + + "2?/v1/{entry.name=projects/*/locations/*" + + "/entryGroups/*/entries/*}:\005entry\332A\005entry" + + "\332A\021entry,update_mask\022\240\001\n\013DeleteEntry\022/.g" + + "oogle.cloud.datacatalog.v1.DeleteEntryRe" + + "quest\032\026.google.protobuf.Empty\"H\202\323\344\223\002;*9/" + + "v1/{name=projects/*/locations/*/entryGro" + + "ups/*/entries/*}\332A\004name\022\246\001\n\010GetEntry\022,.g" + + "oogle.cloud.datacatalog.v1.GetEntryReque" + + "st\032\".google.cloud.datacatalog.v1.Entry\"H" + + "\202\323\344\223\002;\0229/v1/{name=projects/*/locations/*" + + "/entryGroups/*/entries/*}\332A\004name\022~\n\013Look" + + "upEntry\022/.google.cloud.datacatalog.v1.Lo" + + "okupEntryRequest\032\".google.cloud.datacata" + + "log.v1.Entry\"\032\202\323\344\223\002\024\022\022/v1/entries:lookup" + + "\022\274\001\n\013ListEntries\022/.google.cloud.datacata" + + "log.v1.ListEntriesRequest\0320.google.cloud" + + ".datacatalog.v1.ListEntriesResponse\"J\202\323\344" + + "\223\002;\0229/v1/{parent=projects/*/locations/*/" + + "entryGroups/*}/entries\332A\006parent\022\342\001\n\021Crea" + + "teTagTemplate\0225.google.cloud.datacatalog" + + ".v1.CreateTagTemplateRequest\032(.google.cl" + + "oud.datacatalog.v1.TagTemplate\"l\202\323\344\223\002@\"0" + + "/v1/{parent=projects/*/locations/*}/tagT" + + "emplates:\014tag_template\332A#parent,tag_temp" + + "late_id,tag_template\022\257\001\n\016GetTagTemplate\022" + + "2.google.cloud.datacatalog.v1.GetTagTemp" + + "lateRequest\032(.google.cloud.datacatalog.v" + + "1.TagTemplate\"?\202\323\344\223\0022\0220/v1/{name=project" + + "s/*/locations/*/tagTemplates/*}\332A\004name\022\363" + + "\001\n\021UpdateTagTemplate\0225.google.cloud.data" + + "catalog.v1.UpdateTagTemplateRequest\032(.go" + + "ogle.cloud.datacatalog.v1.TagTemplate\"}\202" + + "\323\344\223\002M2=/v1/{tag_template.name=projects/*" + + "/locations/*/tagTemplates/*}:\014tag_templa" + + "te\332A\014tag_template\332A\030tag_template,update_" + + "mask\022\251\001\n\021DeleteTagTemplate\0225.google.clou" + + "d.datacatalog.v1.DeleteTagTemplateReques" + + "t\032\026.google.protobuf.Empty\"E\202\323\344\223\0022*0/v1/{" + + "name=projects/*/locations/*/tagTemplates" + + "/*}\332A\nname,force\022\215\002\n\026CreateTagTemplateFi" + + "eld\022:.google.cloud.datacatalog.v1.Create" + + "TagTemplateFieldRequest\032-.google.cloud.d" + + "atacatalog.v1.TagTemplateField\"\207\001\202\323\344\223\002O\"" + + "9/v1/{parent=projects/*/locations/*/tagT" + + "emplates/*}/fields:\022tag_template_field\332A" + + "/parent,tag_template_field_id,tag_templa" + + "te_field\022\233\002\n\026UpdateTagTemplateField\022:.go" + + "ogle.cloud.datacatalog.v1.UpdateTagTempl" + + "ateFieldRequest\032-.google.cloud.datacatal" + + "og.v1.TagTemplateField\"\225\001\202\323\344\223\002O29/v1/{na" + + "me=projects/*/locations/*/tagTemplates/*" + + "/fields/*}:\022tag_template_field\332A\027name,ta" + + "g_template_field\332A#name,tag_template_fie" + + "ld,update_mask\022\361\001\n\026RenameTagTemplateFiel" + + "d\022:.google.cloud.datacatalog.v1.RenameTa" + + "gTemplateFieldRequest\032-.google.cloud.dat" + + "acatalog.v1.TagTemplateField\"l\202\323\344\223\002E\"@/v" + + "1/{name=projects/*/locations/*/tagTempla" + + "tes/*/fields/*}:rename:\001*\332A\036name,new_tag" + + "_template_field_id\022\274\001\n\026DeleteTagTemplate" + + "Field\022:.google.cloud.datacatalog.v1.Dele" + + "teTagTemplateFieldRequest\032\026.google.proto" + + "buf.Empty\"N\202\323\344\223\002;*9/v1/{name=projects/*/" + + "locations/*/tagTemplates/*/fields/*}\332A\nn" + + "ame,force\022\371\001\n\tCreateTag\022-.google.cloud.d" + + "atacatalog.v1.CreateTagRequest\032 .google." + + "cloud.datacatalog.v1.Tag\"\232\001\202\323\344\223\002\206\001\"@/v1/" + + "{parent=projects/*/locations/*/entryGrou" + + "ps/*/entries/*}/tags:\003tagZ=\"6/v1/{parent" + + "=projects/*/locations/*/entryGroups/*}/t" + + "ags:\003tag\332A\nparent,tag\022\214\002\n\tUpdateTag\022-.go" + + "ogle.cloud.datacatalog.v1.UpdateTagReque" + + "st\032 .google.cloud.datacatalog.v1.Tag\"\255\001\202" + + "\323\344\223\002\216\0012D/v1/{tag.name=projects/*/locatio" + + "ns/*/entryGroups/*/entries/*/tags/*}:\003ta" + + "gZA2:/v1/{tag.name=projects/*/locations/" + + "*/entryGroups/*/tags/*}:\003tag\332A\003tag\332A\017tag" + + ",update_mask\022\336\001\n\tDeleteTag\022-.google.clou" + + "d.datacatalog.v1.DeleteTagRequest\032\026.goog" + + "le.protobuf.Empty\"\211\001\202\323\344\223\002|*@/v1/{name=pr" + + "ojects/*/locations/*/entryGroups/*/entri" + + "es/*/tags/*}Z8*6/v1/{name=projects/*/loc" + + "ations/*/entryGroups/*/tags/*}\332A\004name\022\365\001" + + "\n\010ListTags\022,.google.cloud.datacatalog.v1" + + ".ListTagsRequest\032-.google.cloud.datacata" + + "log.v1.ListTagsResponse\"\213\001\202\323\344\223\002|\022@/v1/{p" + + "arent=projects/*/locations/*/entryGroups" + + "/*/entries/*}/tagsZ8\0226/v1/{parent=projec" + + "ts/*/locations/*/entryGroups/*}/tags\332A\006p" + + "arent\022\340\001\n\014SetIamPolicy\022\".google.iam.v1.S" + + "etIamPolicyRequest\032\025.google.iam.v1.Polic" + + "y\"\224\001\202\323\344\223\002\215\001\"A/v1/{resource=projects/*/lo" + + "cations/*/tagTemplates/*}:setIamPolicy:\001" + + "*ZE\"@/v1/{resource=projects/*/locations/" + + "*/entryGroups/*}:setIamPolicy:\001*\022\261\002\n\014Get" + + "IamPolicy\022\".google.iam.v1.GetIamPolicyRe" + + "quest\032\025.google.iam.v1.Policy\"\345\001\202\323\344\223\002\336\001\"A" + + "/v1/{resource=projects/*/locations/*/tag" + + "Templates/*}:getIamPolicy:\001*ZE\"@/v1/{res" + + "ource=projects/*/locations/*/entryGroups" + + "/*}:getIamPolicy:\001*ZO\"J/v1/{resource=pro" + + "jects/*/locations/*/entryGroups/*/entrie" + + "s/*}:getIamPolicy:\001*\022\343\002\n\022TestIamPermissi" + + "ons\022(.google.iam.v1.TestIamPermissionsRe" + + "quest\032).google.iam.v1.TestIamPermissions" + + "Response\"\367\001\202\323\344\223\002\360\001\"G/v1/{resource=projec" + + "ts/*/locations/*/tagTemplates/*}:testIam" + + "Permissions:\001*ZK\"F/v1/{resource=projects" + + "/*/locations/*/entryGroups/*}:testIamPer" + + "missions:\001*ZU\"P/v1/{resource=projects/*/" + + "locations/*/entryGroups/*/entries/*}:tes" + + "tIamPermissions:\001*\032N\312A\032datacatalog.googl" + + "eapis.com\322A.https://www.googleapis.com/a" + + "uth/cloud-platformBn\n\037com.google.cloud.d" + + "atacatalog.v1P\001ZFgoogle.golang.org/genpr" + + "oto/googleapis/cloud/datacatalog/v1;data" + + "catalog\370\001\001b\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.cloud.datacatalog.v1.Common.getDescriptor(), + com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass.getDescriptor(), + com.google.cloud.datacatalog.v1.SchemaOuterClass.getDescriptor(), + com.google.cloud.datacatalog.v1.Search.getDescriptor(), + com.google.cloud.datacatalog.v1.TableSpecOuterClass.getDescriptor(), + com.google.cloud.datacatalog.v1.Tags.getDescriptor(), + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(), + com.google.iam.v1.IamPolicyProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor, + new java.lang.String[] { + "Scope", "Query", "PageSize", "PageToken", "OrderBy", + }); + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor = + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor, + new java.lang.String[] { + "IncludeOrgIds", "IncludeProjectIds", "IncludeGcpPublicDatasets", + }); + internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor, + new java.lang.String[] { + "Results", "NextPageToken", + }); + internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateEntryGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "EntryGroupId", "EntryGroup", + }); + internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor, + new java.lang.String[] { + "EntryGroup", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor, + new java.lang.String[] { + "Name", "ReadMask", + }); + internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor, + new java.lang.String[] { + "EntryGroups", "NextPageToken", + }); + internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateEntryRequest_descriptor, + new java.lang.String[] { + "Parent", "EntryId", "Entry", + }); + internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor, + new java.lang.String[] { + "Entry", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datacatalog_v1_GetEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor, + new java.lang.String[] { + "LinkedResource", "SqlResource", "TargetName", + }); + internal_static_google_cloud_datacatalog_v1_Entry_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datacatalog_v1_Entry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_Entry_descriptor, + new java.lang.String[] { + "Name", + "LinkedResource", + "Type", + "UserSpecifiedType", + "IntegratedSystem", + "UserSpecifiedSystem", + "GcsFilesetSpec", + "BigqueryTableSpec", + "BigqueryDateShardedSpec", + "DisplayName", + "Description", + "Schema", + "SourceSystemTimestamps", + "EntryType", + "System", + "TypeSpec", + }); + internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datacatalog_v1_EntryGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "DataCatalogTimestamps", + }); + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor, + new java.lang.String[] { + "Parent", "TagTemplateId", "TagTemplate", + }); + internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor, + new java.lang.String[] { + "TagTemplate", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_datacatalog_v1_CreateTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor, + new java.lang.String[] { + "Parent", "Tag", + }); + internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor, + new java.lang.String[] { + "Tag", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor, + new java.lang.String[] { + "Parent", "TagTemplateFieldId", "TagTemplateField", + }); + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor, + new java.lang.String[] { + "Name", "TagTemplateField", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor, + new java.lang.String[] { + "Name", "NewTagTemplateFieldId", + }); + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_datacatalog_v1_ListTagsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_datacatalog_v1_ListTagsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor, + new java.lang.String[] { + "Tags", "NextPageToken", + }); + internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor, + new java.lang.String[] { + "Entries", "NextPageToken", + }); + 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.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.cloud.datacatalog.v1.Common.getDescriptor(); + com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass.getDescriptor(); + com.google.cloud.datacatalog.v1.SchemaOuterClass.getDescriptor(); + com.google.cloud.datacatalog.v1.Search.getDescriptor(); + com.google.cloud.datacatalog.v1.TableSpecOuterClass.getDescriptor(); + com.google.cloud.datacatalog.v1.Tags.getDescriptor(); + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(); + com.google.iam.v1.IamPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequest.java new file mode 100644 index 00000000..3b0e79cd --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequest.java @@ -0,0 +1,746 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteEntryGroupRequest} + */ +public final class DeleteEntryGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteEntryGroupRequest) + DeleteEntryGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEntryGroupRequest.newBuilder() to construct. + private DeleteEntryGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEntryGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEntryGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEntryGroupRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * 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) { + 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 entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * 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 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 FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + * + * + *
+   * Optional. If true, deletes all entries in the entry group.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest other = + (com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!unknownFields.equals(other.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) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteEntryGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteEntryGroupRequest) + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest build() { + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest result = + new com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 boolean force_; + /** + * + * + *
+     * Optional. If true, deletes all entries in the entry group.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If true, deletes all entries in the entry group.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If true, deletes all entries in the entry group.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = 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.cloud.datacatalog.v1.DeleteEntryGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteEntryGroupRequest) + private static final com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEntryGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEntryGroupRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequestOrBuilder.java new file mode 100644 index 00000000..a0215ab2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequestOrBuilder.java @@ -0,0 +1,69 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteEntryGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteEntryGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If true, deletes all entries in the entry group.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequest.java new file mode 100644 index 00000000..dcbdaaae --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequest.java @@ -0,0 +1,657 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteEntryRequest} + */ +public final class DeleteEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteEntryRequest) + DeleteEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEntryRequest.newBuilder() to construct. + private DeleteEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEntryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteEntryRequest.class, + com.google.cloud.datacatalog.v1.DeleteEntryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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) { + 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 entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.cloud.datacatalog.v1.DeleteEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteEntryRequest other = + (com.google.cloud.datacatalog.v1.DeleteEntryRequest) 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.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.DeleteEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteEntryRequest) + com.google.cloud.datacatalog.v1.DeleteEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteEntryRequest.class, + com.google.cloud.datacatalog.v1.DeleteEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryRequest build() { + com.google.cloud.datacatalog.v1.DeleteEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteEntryRequest result = + new com.google.cloud.datacatalog.v1.DeleteEntryRequest(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.cloud.datacatalog.v1.DeleteEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteEntryRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeleteEntryRequest.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.cloud.datacatalog.v1.DeleteEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeleteEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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.cloud.datacatalog.v1.DeleteEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteEntryRequest) + private static final com.google.cloud.datacatalog.v1.DeleteEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteEntryRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequestOrBuilder.java new file mode 100644 index 00000000..5504b90b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequestOrBuilder.java @@ -0,0 +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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequest.java new file mode 100644 index 00000000..220b1502 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequest.java @@ -0,0 +1,656 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagRequest} + */ +public final class DeleteTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteTagRequest) + DeleteTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTagRequest.newBuilder() to construct. + private DeleteTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTagRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag to delete. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * 
+ * + * + * 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) { + 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 tag to delete. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * 
+ * + * + * 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 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.cloud.datacatalog.v1.DeleteTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteTagRequest other = + (com.google.cloud.datacatalog.v1.DeleteTagRequest) 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.cloud.datacatalog.v1.DeleteTagRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.DeleteTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteTagRequest) + com.google.cloud.datacatalog.v1.DeleteTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagRequest build() { + com.google.cloud.datacatalog.v1.DeleteTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteTagRequest result = + new com.google.cloud.datacatalog.v1.DeleteTagRequest(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.cloud.datacatalog.v1.DeleteTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeleteTagRequest.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.cloud.datacatalog.v1.DeleteTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.DeleteTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag to delete. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * 
+ * + * + * 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 tag to delete. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * 
+ * + * + * 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 tag to delete. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * 
+ * + * + * 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 tag to delete. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * 
+ * + * + * 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 tag to delete. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * 
+ * + * + * 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.cloud.datacatalog.v1.DeleteTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteTagRequest) + private static final com.google.cloud.datacatalog.v1.DeleteTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequestOrBuilder.java new file mode 100644 index 00000000..7ed7d8cf --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequestOrBuilder.java @@ -0,0 +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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag to delete. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag to delete. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * 
+ * + * + * 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/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequest.java new file mode 100644 index 00000000..a1d19549 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequest.java @@ -0,0 +1,758 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} + */ +public final class DeleteTagTemplateFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + DeleteTagTemplateFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTagTemplateFieldRequest.newBuilder() to construct. + private DeleteTagTemplateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTagTemplateFieldRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTagTemplateFieldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTagTemplateFieldRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag template field to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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) { + 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 tag template field to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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 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 FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + * + * + *
+   * Required. Currently, this field must always be set to `true`.
+   * This confirms the deletion of this field from any tags using this field.
+   * `force = false` will be supported in the future.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest other = + (com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!unknownFields.equals(other.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) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest build() { + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest result = + new com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest other) { + if (other + == com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag template field to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 boolean force_; + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of this field from any tags using this field.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of this field from any tags using this field.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of this field from any tags using this field.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = 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.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + private static final com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTagTemplateFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTagTemplateFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequestOrBuilder.java new file mode 100644 index 00000000..3d099fd8 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteTagTemplateFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag template field to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag template field to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Currently, this field must always be set to `true`.
+   * This confirms the deletion of this field from any tags using this field.
+   * `force = false` will be supported in the future.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequest.java new file mode 100644 index 00000000..ad669523 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequest.java @@ -0,0 +1,754 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagTemplateRequest} + */ +public final class DeleteTagTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteTagTemplateRequest) + DeleteTagTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTagTemplateRequest.newBuilder() to construct. + private DeleteTagTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTagTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTagTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTagTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag template to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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) { + 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 tag template to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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 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 FORCE_FIELD_NUMBER = 2; + private boolean force_; + /** + * + * + *
+   * Required. Currently, this field must always be set to `true`.
+   * This confirms the deletion of any possible tags using this template.
+   * `force = false` will be supported in the future.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest other = + (com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!unknownFields.equals(other.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) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTagTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteTagTemplateRequest) + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest build() { + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest result = + new com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest(this); + result.name_ = name_; + result.force_ = force_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag template to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template to delete. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 boolean force_; + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of any possible tags using this template.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of any possible tags using this template.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Currently, this field must always be set to `true`.
+     * This confirms the deletion of any possible tags using this template.
+     * `force = false` will be supported in the future.
+     * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = 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.cloud.datacatalog.v1.DeleteTagTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteTagTemplateRequest) + private static final com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTagTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTagTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTagTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequestOrBuilder.java new file mode 100644 index 00000000..1a68b1aa --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteTagTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteTagTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag template to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag template to delete. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Currently, this field must always be set to `true`.
+   * This confirms the deletion of any possible tags using this template.
+   * `force = false` will be supported in the future.
+   * 
+ * + * bool force = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java new file mode 100644 index 00000000..291d5f10 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java @@ -0,0 +1,3922 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Entry Metadata.
+ * A Data Catalog Entry resource represents another resource in Google
+ * Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or
+ * outside of Google Cloud Platform. Clients can use the `linked_resource` field
+ * in the Entry resource to refer to the original resource ID of the source
+ * system.
+ * An Entry resource contains resource details, such as its schema. An Entry can
+ * also be used to attach flexible metadata, such as a
+ * [Tag][google.cloud.datacatalog.v1.Tag].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Entry} + */ +public final class Entry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.Entry) + EntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entry() { + name_ = ""; + linkedResource_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + entryTypeCase_ = 2; + entryType_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 42: + { + com.google.cloud.datacatalog.v1.Schema.Builder subBuilder = null; + if (schema_ != null) { + subBuilder = schema_.toBuilder(); + } + schema_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Schema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(schema_); + schema_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder subBuilder = null; + if (typeSpecCase_ == 6) { + subBuilder = + ((com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_).toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.GcsFilesetSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder subBuilder = null; + if (sourceSystemTimestamps_ != null) { + subBuilder = sourceSystemTimestamps_.toBuilder(); + } + sourceSystemTimestamps_ = + input.readMessage( + com.google.cloud.datacatalog.v1.SystemTimestamps.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceSystemTimestamps_); + sourceSystemTimestamps_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + linkedResource_ = s; + break; + } + case 98: + { + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder subBuilder = null; + if (typeSpecCase_ == 12) { + subBuilder = + ((com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_).toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.BigQueryTableSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 12; + break; + } + case 122: + { + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder subBuilder = null; + if (typeSpecCase_ == 15) { + subBuilder = + ((com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_) + .toBuilder(); + } + typeSpec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_); + typeSpec_ = subBuilder.buildPartial(); + } + typeSpecCase_ = 15; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + entryTypeCase_ = 16; + entryType_ = s; + break; + } + case 136: + { + int rawValue = input.readEnum(); + systemCase_ = 17; + system_ = rawValue; + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + systemCase_ = 18; + system_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Entry.class, + com.google.cloud.datacatalog.v1.Entry.Builder.class); + } + + private int entryTypeCase_ = 0; + private java.lang.Object entryType_; + + public enum EntryTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TYPE(2), + USER_SPECIFIED_TYPE(16), + ENTRYTYPE_NOT_SET(0); + private final int value; + + private EntryTypeCase(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 EntryTypeCase valueOf(int value) { + return forNumber(value); + } + + public static EntryTypeCase forNumber(int value) { + switch (value) { + case 2: + return TYPE; + case 16: + return USER_SPECIFIED_TYPE; + case 0: + return ENTRYTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EntryTypeCase getEntryTypeCase() { + return EntryTypeCase.forNumber(entryTypeCase_); + } + + private int systemCase_ = 0; + private java.lang.Object system_; + + public enum SystemCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTEGRATED_SYSTEM(17), + USER_SPECIFIED_SYSTEM(18), + SYSTEM_NOT_SET(0); + private final int value; + + private SystemCase(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 SystemCase valueOf(int value) { + return forNumber(value); + } + + public static SystemCase forNumber(int value) { + switch (value) { + case 17: + return INTEGRATED_SYSTEM; + case 18: + return USER_SPECIFIED_SYSTEM; + case 0: + return SYSTEM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SystemCase getSystemCase() { + return SystemCase.forNumber(systemCase_); + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public enum TypeSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_FILESET_SPEC(6), + BIGQUERY_TABLE_SPEC(12), + BIGQUERY_DATE_SHARDED_SPEC(15), + TYPESPEC_NOT_SET(0); + private final int value; + + private TypeSpecCase(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 TypeSpecCase valueOf(int value) { + return forNumber(value); + } + + public static TypeSpecCase forNumber(int value) { + switch (value) { + case 6: + return GCS_FILESET_SPEC; + case 12: + return BIGQUERY_TABLE_SPEC; + case 15: + return BIGQUERY_DATE_SHARDED_SPEC; + case 0: + return TYPESPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The Data Catalog resource name of the entry in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + 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 Data Catalog resource name of the entry in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + 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 LINKED_RESOURCE_FIELD_NUMBER = 9; + private volatile java.lang.Object linkedResource_; + /** + * + * + *
+   * The resource this metadata entry refers to.
+   * For Google Cloud Platform resources, `linked_resource` is the [full name of
+   * the
+   * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   * Output only when Entry is of type in the EntryType enum. For entries with
+   * user_specified_type, this field is optional and defaults to an empty
+   * string.
+   * 
+ * + * string linked_resource = 9; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } + } + /** + * + * + *
+   * The resource this metadata entry refers to.
+   * For Google Cloud Platform resources, `linked_resource` is the [full name of
+   * the
+   * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   * Output only when Entry is of type in the EntryType enum. For entries with
+   * user_specified_type, this field is optional and defaults to an empty
+   * string.
+   * 
+ * + * string linked_resource = 9; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + /** + * + * + *
+   * The type of the entry.
+   * Only used for Entries with types in the EntryType enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + if (entryTypeCase_ == 2) { + return (java.lang.Integer) entryType_; + } + return 0; + } + /** + * + * + *
+   * The type of the entry.
+   * Only used for Entries with types in the EntryType enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The type. + */ + public com.google.cloud.datacatalog.v1.EntryType getType() { + if (entryTypeCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.EntryType result = + com.google.cloud.datacatalog.v1.EntryType.valueOf((java.lang.Integer) entryType_); + return result == null ? com.google.cloud.datacatalog.v1.EntryType.UNRECOGNIZED : result; + } + return com.google.cloud.datacatalog.v1.EntryType.ENTRY_TYPE_UNSPECIFIED; + } + + public static final int USER_SPECIFIED_TYPE_FIELD_NUMBER = 16; + /** + * + * + *
+   * Entry type if it does not fit any of the input-allowed values listed in
+   * `EntryType` enum above. When creating an entry, users should check the
+   * enum values first, if nothing matches the entry to be created, then
+   * provide a custom value, for example "my_special_type".
+   * `user_specified_type` strings must begin with a letter or underscore and
+   * can only contain letters, numbers, and underscores; are case insensitive;
+   * must be at least 1 character and at most 64 characters long.
+   * Currently, only FILESET enum value is allowed. All other entries created
+   * through Data Catalog must use `user_specified_type`.
+   * 
+ * + * string user_specified_type = 16; + * + * @return The userSpecifiedType. + */ + public java.lang.String getUserSpecifiedType() { + java.lang.Object ref = ""; + if (entryTypeCase_ == 16) { + ref = entryType_; + } + if (ref instanceof java.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 (entryTypeCase_ == 16) { + entryType_ = s; + } + return s; + } + } + /** + * + * + *
+   * Entry type if it does not fit any of the input-allowed values listed in
+   * `EntryType` enum above. When creating an entry, users should check the
+   * enum values first, if nothing matches the entry to be created, then
+   * provide a custom value, for example "my_special_type".
+   * `user_specified_type` strings must begin with a letter or underscore and
+   * can only contain letters, numbers, and underscores; are case insensitive;
+   * must be at least 1 character and at most 64 characters long.
+   * Currently, only FILESET enum value is allowed. All other entries created
+   * through Data Catalog must use `user_specified_type`.
+   * 
+ * + * string user_specified_type = 16; + * + * @return The bytes for userSpecifiedType. + */ + public com.google.protobuf.ByteString getUserSpecifiedTypeBytes() { + java.lang.Object ref = ""; + if (entryTypeCase_ == 16) { + ref = entryType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entryTypeCase_ == 16) { + entryType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTEGRATED_SYSTEM_FIELD_NUMBER = 17; + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + public int getIntegratedSystemValue() { + if (systemCase_ == 17) { + return (java.lang.Integer) system_; + } + return 0; + } + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + public com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem() { + if (systemCase_ == 17) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.IntegratedSystem result = + com.google.cloud.datacatalog.v1.IntegratedSystem.valueOf((java.lang.Integer) system_); + return result == null + ? com.google.cloud.datacatalog.v1.IntegratedSystem.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.IntegratedSystem.INTEGRATED_SYSTEM_UNSPECIFIED; + } + + public static final int USER_SPECIFIED_SYSTEM_FIELD_NUMBER = 18; + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with. `user_specified_system` strings must begin with a letter
+   * or underscore and can only contain letters, numbers, and underscores; are
+   * case insensitive; must be at least 1 character and at most 64 characters
+   * long.
+   * 
+ * + * string user_specified_system = 18; + * + * @return The userSpecifiedSystem. + */ + public java.lang.String getUserSpecifiedSystem() { + java.lang.Object ref = ""; + if (systemCase_ == 18) { + ref = system_; + } + if (ref instanceof java.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 (systemCase_ == 18) { + system_ = s; + } + return s; + } + } + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with. `user_specified_system` strings must begin with a letter
+   * or underscore and can only contain letters, numbers, and underscores; are
+   * case insensitive; must be at least 1 character and at most 64 characters
+   * long.
+   * 
+ * + * string user_specified_system = 18; + * + * @return The bytes for userSpecifiedSystem. + */ + public com.google.protobuf.ByteString getUserSpecifiedSystemBytes() { + java.lang.Object ref = ""; + if (systemCase_ == 18) { + ref = system_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (systemCase_ == 18) { + system_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_FILESET_SPEC_FIELD_NUMBER = 6; + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return Whether the gcsFilesetSpec field is set. + */ + public boolean hasGcsFilesetSpec() { + return typeSpecCase_ == 6; + } + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return The gcsFilesetSpec. + */ + public com.google.cloud.datacatalog.v1.GcsFilesetSpec getGcsFilesetSpec() { + if (typeSpecCase_ == 6) { + return (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder getGcsFilesetSpecOrBuilder() { + if (typeSpecCase_ == 6) { + return (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + + public static final int BIGQUERY_TABLE_SPEC_FIELD_NUMBER = 12; + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return Whether the bigqueryTableSpec field is set. + */ + public boolean hasBigqueryTableSpec() { + return typeSpecCase_ == 12; + } + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return The bigqueryTableSpec. + */ + public com.google.cloud.datacatalog.v1.BigQueryTableSpec getBigqueryTableSpec() { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder + getBigqueryTableSpecOrBuilder() { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + + public static final int BIGQUERY_DATE_SHARDED_SPEC_FIELD_NUMBER = 15; + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return Whether the bigqueryDateShardedSpec field is set. + */ + public boolean hasBigqueryDateShardedSpec() { + return typeSpecCase_ == 15; + } + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return The bigqueryDateShardedSpec. + */ + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getBigqueryDateShardedSpec() { + if (typeSpecCase_ == 15) { + return (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder + getBigqueryDateShardedSpecOrBuilder() { + if (typeSpecCase_ == 15) { + return (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display information such as title and description. A short name to identify
+   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+   * empty string.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + 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 information such as title and description. A short name to identify
+   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+   * empty string.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + 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 = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents. Default value is an empty string.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents. Default value is an empty string.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + 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 SCHEMA_FIELD_NUMBER = 5; + private com.google.cloud.datacatalog.v1.Schema schema_; + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return schema_ != null; + } + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return The schema. + */ + public com.google.cloud.datacatalog.v1.Schema getSchema() { + return schema_ == null ? com.google.cloud.datacatalog.v1.Schema.getDefaultInstance() : schema_; + } + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.v1.SchemaOrBuilder getSchemaOrBuilder() { + return getSchema(); + } + + public static final int SOURCE_SYSTEM_TIMESTAMPS_FIELD_NUMBER = 7; + private com.google.cloud.datacatalog.v1.SystemTimestamps sourceSystemTimestamps_; + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return Whether the sourceSystemTimestamps field is set. + */ + public boolean hasSourceSystemTimestamps() { + return sourceSystemTimestamps_ != null; + } + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return The sourceSystemTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getSourceSystemTimestamps() { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getSourceSystemTimestampsOrBuilder() { + return getSourceSystemTimestamps(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (entryTypeCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) entryType_)); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (schema_ != null) { + output.writeMessage(5, getSchema()); + } + if (typeSpecCase_ == 6) { + output.writeMessage(6, (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_); + } + if (sourceSystemTimestamps_ != null) { + output.writeMessage(7, getSourceSystemTimestamps()); + } + if (!getLinkedResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, linkedResource_); + } + if (typeSpecCase_ == 12) { + output.writeMessage(12, (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_); + } + if (typeSpecCase_ == 15) { + output.writeMessage(15, (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_); + } + if (entryTypeCase_ == 16) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, entryType_); + } + if (systemCase_ == 17) { + output.writeEnum(17, ((java.lang.Integer) system_)); + } + if (systemCase_ == 18) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, system_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (entryTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 2, ((java.lang.Integer) entryType_)); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (schema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSchema()); + } + if (typeSpecCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_); + } + if (sourceSystemTimestamps_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSourceSystemTimestamps()); + } + if (!getLinkedResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, linkedResource_); + } + if (typeSpecCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_); + } + if (typeSpecCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_); + } + if (entryTypeCase_ == 16) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, entryType_); + } + if (systemCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(17, ((java.lang.Integer) system_)); + } + if (systemCase_ == 18) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, system_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.Entry)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.Entry other = (com.google.cloud.datacatalog.v1.Entry) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLinkedResource().equals(other.getLinkedResource())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (hasSourceSystemTimestamps() != other.hasSourceSystemTimestamps()) return false; + if (hasSourceSystemTimestamps()) { + if (!getSourceSystemTimestamps().equals(other.getSourceSystemTimestamps())) return false; + } + if (!getEntryTypeCase().equals(other.getEntryTypeCase())) return false; + switch (entryTypeCase_) { + case 2: + if (getTypeValue() != other.getTypeValue()) return false; + break; + case 16: + if (!getUserSpecifiedType().equals(other.getUserSpecifiedType())) return false; + break; + case 0: + default: + } + if (!getSystemCase().equals(other.getSystemCase())) return false; + switch (systemCase_) { + case 17: + if (getIntegratedSystemValue() != other.getIntegratedSystemValue()) return false; + break; + case 18: + if (!getUserSpecifiedSystem().equals(other.getUserSpecifiedSystem())) return false; + break; + case 0: + default: + } + if (!getTypeSpecCase().equals(other.getTypeSpecCase())) return false; + switch (typeSpecCase_) { + case 6: + if (!getGcsFilesetSpec().equals(other.getGcsFilesetSpec())) return false; + break; + case 12: + if (!getBigqueryTableSpec().equals(other.getBigqueryTableSpec())) return false; + break; + case 15: + if (!getBigqueryDateShardedSpec().equals(other.getBigqueryDateShardedSpec())) 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) + LINKED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLinkedResource().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 (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (hasSourceSystemTimestamps()) { + hash = (37 * hash) + SOURCE_SYSTEM_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getSourceSystemTimestamps().hashCode(); + } + switch (entryTypeCase_) { + case 2: + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTypeValue(); + break; + case 16: + hash = (37 * hash) + USER_SPECIFIED_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getUserSpecifiedType().hashCode(); + break; + case 0: + default: + } + switch (systemCase_) { + case 17: + hash = (37 * hash) + INTEGRATED_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getIntegratedSystemValue(); + break; + case 18: + hash = (37 * hash) + USER_SPECIFIED_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getUserSpecifiedSystem().hashCode(); + break; + case 0: + default: + } + switch (typeSpecCase_) { + case 6: + hash = (37 * hash) + GCS_FILESET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getGcsFilesetSpec().hashCode(); + break; + case 12: + hash = (37 * hash) + BIGQUERY_TABLE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryTableSpec().hashCode(); + break; + case 15: + hash = (37 * hash) + BIGQUERY_DATE_SHARDED_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDateShardedSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Entry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Entry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Entry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.Entry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entry Metadata.
+   * A Data Catalog Entry resource represents another resource in Google
+   * Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or
+   * outside of Google Cloud Platform. Clients can use the `linked_resource` field
+   * in the Entry resource to refer to the original resource ID of the source
+   * system.
+   * An Entry resource contains resource details, such as its schema. An Entry can
+   * also be used to attach flexible metadata, such as a
+   * [Tag][google.cloud.datacatalog.v1.Tag].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Entry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.Entry) + com.google.cloud.datacatalog.v1.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Entry.class, + com.google.cloud.datacatalog.v1.Entry.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.Entry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + linkedResource_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (schemaBuilder_ == null) { + schema_ = null; + } else { + schema_ = null; + schemaBuilder_ = null; + } + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = null; + } else { + sourceSystemTimestamps_ = null; + sourceSystemTimestampsBuilder_ = null; + } + entryTypeCase_ = 0; + entryType_ = null; + systemCase_ = 0; + system_ = null; + typeSpecCase_ = 0; + typeSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_Entry_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Entry getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.Entry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Entry build() { + com.google.cloud.datacatalog.v1.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Entry buildPartial() { + com.google.cloud.datacatalog.v1.Entry result = + new com.google.cloud.datacatalog.v1.Entry(this); + result.name_ = name_; + result.linkedResource_ = linkedResource_; + if (entryTypeCase_ == 2) { + result.entryType_ = entryType_; + } + if (entryTypeCase_ == 16) { + result.entryType_ = entryType_; + } + if (systemCase_ == 17) { + result.system_ = system_; + } + if (systemCase_ == 18) { + result.system_ = system_; + } + if (typeSpecCase_ == 6) { + if (gcsFilesetSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = gcsFilesetSpecBuilder_.build(); + } + } + if (typeSpecCase_ == 12) { + if (bigqueryTableSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = bigqueryTableSpecBuilder_.build(); + } + } + if (typeSpecCase_ == 15) { + if (bigqueryDateShardedSpecBuilder_ == null) { + result.typeSpec_ = typeSpec_; + } else { + result.typeSpec_ = bigqueryDateShardedSpecBuilder_.build(); + } + } + result.displayName_ = displayName_; + result.description_ = description_; + if (schemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + if (sourceSystemTimestampsBuilder_ == null) { + result.sourceSystemTimestamps_ = sourceSystemTimestamps_; + } else { + result.sourceSystemTimestamps_ = sourceSystemTimestampsBuilder_.build(); + } + result.entryTypeCase_ = entryTypeCase_; + result.systemCase_ = systemCase_; + result.typeSpecCase_ = typeSpecCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.Entry) { + return mergeFrom((com.google.cloud.datacatalog.v1.Entry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.Entry other) { + if (other == com.google.cloud.datacatalog.v1.Entry.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLinkedResource().isEmpty()) { + linkedResource_ = other.linkedResource_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.hasSourceSystemTimestamps()) { + mergeSourceSystemTimestamps(other.getSourceSystemTimestamps()); + } + switch (other.getEntryTypeCase()) { + case TYPE: + { + setTypeValue(other.getTypeValue()); + break; + } + case USER_SPECIFIED_TYPE: + { + entryTypeCase_ = 16; + entryType_ = other.entryType_; + onChanged(); + break; + } + case ENTRYTYPE_NOT_SET: + { + break; + } + } + switch (other.getSystemCase()) { + case INTEGRATED_SYSTEM: + { + setIntegratedSystemValue(other.getIntegratedSystemValue()); + break; + } + case USER_SPECIFIED_SYSTEM: + { + systemCase_ = 18; + system_ = other.system_; + onChanged(); + break; + } + case SYSTEM_NOT_SET: + { + break; + } + } + switch (other.getTypeSpecCase()) { + case GCS_FILESET_SPEC: + { + mergeGcsFilesetSpec(other.getGcsFilesetSpec()); + break; + } + case BIGQUERY_TABLE_SPEC: + { + mergeBigqueryTableSpec(other.getBigqueryTableSpec()); + break; + } + case BIGQUERY_DATE_SHARDED_SPEC: + { + mergeBigqueryDateShardedSpec(other.getBigqueryDateShardedSpec()); + break; + } + case TYPESPEC_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.cloud.datacatalog.v1.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.Entry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int entryTypeCase_ = 0; + private java.lang.Object entryType_; + + public EntryTypeCase getEntryTypeCase() { + return EntryTypeCase.forNumber(entryTypeCase_); + } + + public Builder clearEntryType() { + entryTypeCase_ = 0; + entryType_ = null; + onChanged(); + return this; + } + + private int systemCase_ = 0; + private java.lang.Object system_; + + public SystemCase getSystemCase() { + return SystemCase.forNumber(systemCase_); + } + + public Builder clearSystem() { + systemCase_ = 0; + system_ = null; + onChanged(); + return this; + } + + private int typeSpecCase_ = 0; + private java.lang.Object typeSpec_; + + public TypeSpecCase getTypeSpecCase() { + return TypeSpecCase.forNumber(typeSpecCase_); + } + + public Builder clearTypeSpec() { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The Data Catalog resource name of the entry in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * The Data Catalog resource name of the entry in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * string name = 1 [(.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; + } + } + /** + * + * + *
+     * The Data Catalog resource name of the entry in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * string name = 1 [(.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; + } + /** + * + * + *
+     * The Data Catalog resource name of the entry in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Data Catalog resource name of the entry in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * Note that this Entry and its child resources may not actually be stored in
+     * the location in this name.
+     * 
+ * + * string name = 1 [(.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 java.lang.Object linkedResource_ = ""; + /** + * + * + *
+     * The resource this metadata entry refers to.
+     * For Google Cloud Platform resources, `linked_resource` is the [full name of
+     * the
+     * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     * Output only when Entry is of type in the EntryType enum. For entries with
+     * user_specified_type, this field is optional and defaults to an empty
+     * string.
+     * 
+ * + * string linked_resource = 9; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource this metadata entry refers to.
+     * For Google Cloud Platform resources, `linked_resource` is the [full name of
+     * the
+     * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     * Output only when Entry is of type in the EntryType enum. For entries with
+     * user_specified_type, this field is optional and defaults to an empty
+     * string.
+     * 
+ * + * string linked_resource = 9; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource this metadata entry refers to.
+     * For Google Cloud Platform resources, `linked_resource` is the [full name of
+     * the
+     * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     * Output only when Entry is of type in the EntryType enum. For entries with
+     * user_specified_type, this field is optional and defaults to an empty
+     * string.
+     * 
+ * + * string linked_resource = 9; + * + * @param value The linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + linkedResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource this metadata entry refers to.
+     * For Google Cloud Platform resources, `linked_resource` is the [full name of
+     * the
+     * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     * Output only when Entry is of type in the EntryType enum. For entries with
+     * user_specified_type, this field is optional and defaults to an empty
+     * string.
+     * 
+ * + * string linked_resource = 9; + * + * @return This builder for chaining. + */ + public Builder clearLinkedResource() { + + linkedResource_ = getDefaultInstance().getLinkedResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource this metadata entry refers to.
+     * For Google Cloud Platform resources, `linked_resource` is the [full name of
+     * the
+     * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+     * For example, the `linked_resource` for a table resource from BigQuery is:
+     * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     * Output only when Entry is of type in the EntryType enum. For entries with
+     * user_specified_type, this field is optional and defaults to an empty
+     * string.
+     * 
+ * + * string linked_resource = 9; + * + * @param value The bytes for linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + linkedResource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the entry.
+     * Only used for Entries with types in the EntryType enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + if (entryTypeCase_ == 2) { + return ((java.lang.Integer) entryType_).intValue(); + } + return 0; + } + /** + * + * + *
+     * The type of the entry.
+     * Only used for Entries with types in the EntryType enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryType 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) { + entryTypeCase_ = 2; + entryType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the entry.
+     * Only used for Entries with types in the EntryType enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The type. + */ + public com.google.cloud.datacatalog.v1.EntryType getType() { + if (entryTypeCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.EntryType result = + com.google.cloud.datacatalog.v1.EntryType.valueOf((java.lang.Integer) entryType_); + return result == null ? com.google.cloud.datacatalog.v1.EntryType.UNRECOGNIZED : result; + } + return com.google.cloud.datacatalog.v1.EntryType.ENTRY_TYPE_UNSPECIFIED; + } + /** + * + * + *
+     * The type of the entry.
+     * Only used for Entries with types in the EntryType enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datacatalog.v1.EntryType value) { + if (value == null) { + throw new NullPointerException(); + } + entryTypeCase_ = 2; + entryType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the entry.
+     * Only used for Entries with types in the EntryType enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + if (entryTypeCase_ == 2) { + entryTypeCase_ = 0; + entryType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Entry type if it does not fit any of the input-allowed values listed in
+     * `EntryType` enum above. When creating an entry, users should check the
+     * enum values first, if nothing matches the entry to be created, then
+     * provide a custom value, for example "my_special_type".
+     * `user_specified_type` strings must begin with a letter or underscore and
+     * can only contain letters, numbers, and underscores; are case insensitive;
+     * must be at least 1 character and at most 64 characters long.
+     * Currently, only FILESET enum value is allowed. All other entries created
+     * through Data Catalog must use `user_specified_type`.
+     * 
+ * + * string user_specified_type = 16; + * + * @return The userSpecifiedType. + */ + public java.lang.String getUserSpecifiedType() { + java.lang.Object ref = ""; + if (entryTypeCase_ == 16) { + ref = entryType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entryTypeCase_ == 16) { + entryType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Entry type if it does not fit any of the input-allowed values listed in
+     * `EntryType` enum above. When creating an entry, users should check the
+     * enum values first, if nothing matches the entry to be created, then
+     * provide a custom value, for example "my_special_type".
+     * `user_specified_type` strings must begin with a letter or underscore and
+     * can only contain letters, numbers, and underscores; are case insensitive;
+     * must be at least 1 character and at most 64 characters long.
+     * Currently, only FILESET enum value is allowed. All other entries created
+     * through Data Catalog must use `user_specified_type`.
+     * 
+ * + * string user_specified_type = 16; + * + * @return The bytes for userSpecifiedType. + */ + public com.google.protobuf.ByteString getUserSpecifiedTypeBytes() { + java.lang.Object ref = ""; + if (entryTypeCase_ == 16) { + ref = entryType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entryTypeCase_ == 16) { + entryType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Entry type if it does not fit any of the input-allowed values listed in
+     * `EntryType` enum above. When creating an entry, users should check the
+     * enum values first, if nothing matches the entry to be created, then
+     * provide a custom value, for example "my_special_type".
+     * `user_specified_type` strings must begin with a letter or underscore and
+     * can only contain letters, numbers, and underscores; are case insensitive;
+     * must be at least 1 character and at most 64 characters long.
+     * Currently, only FILESET enum value is allowed. All other entries created
+     * through Data Catalog must use `user_specified_type`.
+     * 
+ * + * string user_specified_type = 16; + * + * @param value The userSpecifiedType to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + entryTypeCase_ = 16; + entryType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Entry type if it does not fit any of the input-allowed values listed in
+     * `EntryType` enum above. When creating an entry, users should check the
+     * enum values first, if nothing matches the entry to be created, then
+     * provide a custom value, for example "my_special_type".
+     * `user_specified_type` strings must begin with a letter or underscore and
+     * can only contain letters, numbers, and underscores; are case insensitive;
+     * must be at least 1 character and at most 64 characters long.
+     * Currently, only FILESET enum value is allowed. All other entries created
+     * through Data Catalog must use `user_specified_type`.
+     * 
+ * + * string user_specified_type = 16; + * + * @return This builder for chaining. + */ + public Builder clearUserSpecifiedType() { + if (entryTypeCase_ == 16) { + entryTypeCase_ = 0; + entryType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Entry type if it does not fit any of the input-allowed values listed in
+     * `EntryType` enum above. When creating an entry, users should check the
+     * enum values first, if nothing matches the entry to be created, then
+     * provide a custom value, for example "my_special_type".
+     * `user_specified_type` strings must begin with a letter or underscore and
+     * can only contain letters, numbers, and underscores; are case insensitive;
+     * must be at least 1 character and at most 64 characters long.
+     * Currently, only FILESET enum value is allowed. All other entries created
+     * through Data Catalog must use `user_specified_type`.
+     * 
+ * + * string user_specified_type = 16; + * + * @param value The bytes for userSpecifiedType to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + entryTypeCase_ = 16; + entryType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + public int getIntegratedSystemValue() { + if (systemCase_ == 17) { + return ((java.lang.Integer) system_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for integratedSystem to set. + * @return This builder for chaining. + */ + public Builder setIntegratedSystemValue(int value) { + systemCase_ = 17; + system_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + public com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem() { + if (systemCase_ == 17) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.IntegratedSystem result = + com.google.cloud.datacatalog.v1.IntegratedSystem.valueOf((java.lang.Integer) system_); + return result == null + ? com.google.cloud.datacatalog.v1.IntegratedSystem.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.IntegratedSystem.INTEGRATED_SYSTEM_UNSPECIFIED; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The integratedSystem to set. + * @return This builder for chaining. + */ + public Builder setIntegratedSystem(com.google.cloud.datacatalog.v1.IntegratedSystem value) { + if (value == null) { + throw new NullPointerException(); + } + systemCase_ = 17; + system_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIntegratedSystem() { + if (systemCase_ == 17) { + systemCase_ = 0; + system_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with. `user_specified_system` strings must begin with a letter
+     * or underscore and can only contain letters, numbers, and underscores; are
+     * case insensitive; must be at least 1 character and at most 64 characters
+     * long.
+     * 
+ * + * string user_specified_system = 18; + * + * @return The userSpecifiedSystem. + */ + public java.lang.String getUserSpecifiedSystem() { + java.lang.Object ref = ""; + if (systemCase_ == 18) { + ref = system_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (systemCase_ == 18) { + system_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with. `user_specified_system` strings must begin with a letter
+     * or underscore and can only contain letters, numbers, and underscores; are
+     * case insensitive; must be at least 1 character and at most 64 characters
+     * long.
+     * 
+ * + * string user_specified_system = 18; + * + * @return The bytes for userSpecifiedSystem. + */ + public com.google.protobuf.ByteString getUserSpecifiedSystemBytes() { + java.lang.Object ref = ""; + if (systemCase_ == 18) { + ref = system_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (systemCase_ == 18) { + system_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with. `user_specified_system` strings must begin with a letter
+     * or underscore and can only contain letters, numbers, and underscores; are
+     * case insensitive; must be at least 1 character and at most 64 characters
+     * long.
+     * 
+ * + * string user_specified_system = 18; + * + * @param value The userSpecifiedSystem to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedSystem(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemCase_ = 18; + system_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with. `user_specified_system` strings must begin with a letter
+     * or underscore and can only contain letters, numbers, and underscores; are
+     * case insensitive; must be at least 1 character and at most 64 characters
+     * long.
+     * 
+ * + * string user_specified_system = 18; + * + * @return This builder for chaining. + */ + public Builder clearUserSpecifiedSystem() { + if (systemCase_ == 18) { + systemCase_ = 0; + system_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with. `user_specified_system` strings must begin with a letter
+     * or underscore and can only contain letters, numbers, and underscores; are
+     * case insensitive; must be at least 1 character and at most 64 characters
+     * long.
+     * 
+ * + * string user_specified_system = 18; + * + * @param value The bytes for userSpecifiedSystem to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedSystemBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemCase_ = 18; + system_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFilesetSpec, + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder> + gcsFilesetSpecBuilder_; + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return Whether the gcsFilesetSpec field is set. + */ + public boolean hasGcsFilesetSpec() { + return typeSpecCase_ == 6; + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return The gcsFilesetSpec. + */ + public com.google.cloud.datacatalog.v1.GcsFilesetSpec getGcsFilesetSpec() { + if (gcsFilesetSpecBuilder_ == null) { + if (typeSpecCase_ == 6) { + return (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 6) { + return gcsFilesetSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public Builder setGcsFilesetSpec(com.google.cloud.datacatalog.v1.GcsFilesetSpec value) { + if (gcsFilesetSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + gcsFilesetSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 6; + return this; + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public Builder setGcsFilesetSpec( + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder builderForValue) { + if (gcsFilesetSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + gcsFilesetSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 6; + return this; + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public Builder mergeGcsFilesetSpec(com.google.cloud.datacatalog.v1.GcsFilesetSpec value) { + if (gcsFilesetSpecBuilder_ == null) { + if (typeSpecCase_ == 6 + && typeSpec_ != com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.v1.GcsFilesetSpec.newBuilder( + (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 6) { + gcsFilesetSpecBuilder_.mergeFrom(value); + } + gcsFilesetSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 6; + return this; + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public Builder clearGcsFilesetSpec() { + if (gcsFilesetSpecBuilder_ == null) { + if (typeSpecCase_ == 6) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 6) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + gcsFilesetSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder getGcsFilesetSpecBuilder() { + return getGcsFilesetSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + public com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder getGcsFilesetSpecOrBuilder() { + if ((typeSpecCase_ == 6) && (gcsFilesetSpecBuilder_ != null)) { + return gcsFilesetSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 6) { + return (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a Cloud Storage fileset. This is only valid
+     * on entries of type FILESET.
+     * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFilesetSpec, + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder> + getGcsFilesetSpecFieldBuilder() { + if (gcsFilesetSpecBuilder_ == null) { + if (!(typeSpecCase_ == 6)) { + typeSpec_ = com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + gcsFilesetSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFilesetSpec, + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.GcsFilesetSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 6; + onChanged(); + ; + return gcsFilesetSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryTableSpec, + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder> + bigqueryTableSpecBuilder_; + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return Whether the bigqueryTableSpec field is set. + */ + public boolean hasBigqueryTableSpec() { + return typeSpecCase_ == 12; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return The bigqueryTableSpec. + */ + public com.google.cloud.datacatalog.v1.BigQueryTableSpec getBigqueryTableSpec() { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 12) { + return bigqueryTableSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder setBigqueryTableSpec(com.google.cloud.datacatalog.v1.BigQueryTableSpec value) { + if (bigqueryTableSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + bigqueryTableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder setBigqueryTableSpec( + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder builderForValue) { + if (bigqueryTableSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + bigqueryTableSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder mergeBigqueryTableSpec(com.google.cloud.datacatalog.v1.BigQueryTableSpec value) { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12 + && typeSpec_ + != com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.v1.BigQueryTableSpec.newBuilder( + (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 12) { + bigqueryTableSpecBuilder_.mergeFrom(value); + } + bigqueryTableSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 12; + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public Builder clearBigqueryTableSpec() { + if (bigqueryTableSpecBuilder_ == null) { + if (typeSpecCase_ == 12) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 12) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + bigqueryTableSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder getBigqueryTableSpecBuilder() { + return getBigqueryTableSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + public com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder + getBigqueryTableSpecOrBuilder() { + if ((typeSpecCase_ == 12) && (bigqueryTableSpecBuilder_ != null)) { + return bigqueryTableSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 12) { + return (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification that applies to a BigQuery table. This is only valid on
+     * entries of type `TABLE`.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryTableSpec, + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder> + getBigqueryTableSpecFieldBuilder() { + if (bigqueryTableSpecBuilder_ == null) { + if (!(typeSpecCase_ == 12)) { + typeSpec_ = com.google.cloud.datacatalog.v1.BigQueryTableSpec.getDefaultInstance(); + } + bigqueryTableSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryTableSpec, + com.google.cloud.datacatalog.v1.BigQueryTableSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.BigQueryTableSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 12; + onChanged(); + ; + return bigqueryTableSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder> + bigqueryDateShardedSpecBuilder_; + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return Whether the bigqueryDateShardedSpec field is set. + */ + public boolean hasBigqueryDateShardedSpec() { + return typeSpecCase_ == 15; + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return The bigqueryDateShardedSpec. + */ + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getBigqueryDateShardedSpec() { + if (bigqueryDateShardedSpecBuilder_ == null) { + if (typeSpecCase_ == 15) { + return (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } else { + if (typeSpecCase_ == 15) { + return bigqueryDateShardedSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public Builder setBigqueryDateShardedSpec( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec value) { + if (bigqueryDateShardedSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeSpec_ = value; + onChanged(); + } else { + bigqueryDateShardedSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 15; + return this; + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public Builder setBigqueryDateShardedSpec( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder builderForValue) { + if (bigqueryDateShardedSpecBuilder_ == null) { + typeSpec_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDateShardedSpecBuilder_.setMessage(builderForValue.build()); + } + typeSpecCase_ = 15; + return this; + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public Builder mergeBigqueryDateShardedSpec( + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec value) { + if (bigqueryDateShardedSpecBuilder_ == null) { + if (typeSpecCase_ == 15 + && typeSpec_ + != com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance()) { + typeSpec_ = + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.newBuilder( + (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + typeSpec_ = value; + } + onChanged(); + } else { + if (typeSpecCase_ == 15) { + bigqueryDateShardedSpecBuilder_.mergeFrom(value); + } + bigqueryDateShardedSpecBuilder_.setMessage(value); + } + typeSpecCase_ = 15; + return this; + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public Builder clearBigqueryDateShardedSpec() { + if (bigqueryDateShardedSpecBuilder_ == null) { + if (typeSpecCase_ == 15) { + typeSpecCase_ = 0; + typeSpec_ = null; + onChanged(); + } + } else { + if (typeSpecCase_ == 15) { + typeSpecCase_ = 0; + typeSpec_ = null; + } + bigqueryDateShardedSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder + getBigqueryDateShardedSpecBuilder() { + return getBigqueryDateShardedSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder + getBigqueryDateShardedSpecOrBuilder() { + if ((typeSpecCase_ == 15) && (bigqueryDateShardedSpecBuilder_ != null)) { + return bigqueryDateShardedSpecBuilder_.getMessageOrBuilder(); + } else { + if (typeSpecCase_ == 15) { + return (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_; + } + return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Specification for a group of BigQuery tables with name pattern
+     * `[prefix]YYYYMMDD`. Context:
+     * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+     * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder> + getBigqueryDateShardedSpecFieldBuilder() { + if (bigqueryDateShardedSpecBuilder_ == null) { + if (!(typeSpecCase_ == 15)) { + typeSpec_ = com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); + } + bigqueryDateShardedSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.Builder, + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) typeSpec_, + getParentForChildren(), + isClean()); + typeSpec_ = null; + } + typeSpecCase_ = 15; + onChanged(); + ; + return bigqueryDateShardedSpecBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display information such as title and description. A short name to identify
+     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+     * empty string.
+     * 
+ * + * string display_name = 3; + * + * @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 information such as title and description. A short name to identify
+     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+     * empty string.
+     * 
+ * + * string display_name = 3; + * + * @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 information such as title and description. A short name to identify
+     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+     * empty string.
+     * 
+ * + * string display_name = 3; + * + * @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 information such as title and description. A short name to identify
+     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+     * empty string.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display information such as title and description. A short name to identify
+     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+     * empty string.
+     * 
+ * + * string display_name = 3; + * + * @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_ = ""; + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents. Default value is an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents. Default value is an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents. Default value is an empty string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents. Default value is an empty string.
+     * 
+ * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Entry description, which can consist of several sentences or paragraphs
+     * that describe entry contents. Default value is an empty string.
+     * 
+ * + * 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 com.google.cloud.datacatalog.v1.Schema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Schema, + com.google.cloud.datacatalog.v1.Schema.Builder, + com.google.cloud.datacatalog.v1.SchemaOrBuilder> + schemaBuilder_; + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return schemaBuilder_ != null || schema_ != null; + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return The schema. + */ + public com.google.cloud.datacatalog.v1.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.datacatalog.v1.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public Builder setSchema(com.google.cloud.datacatalog.v1.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public Builder setSchema(com.google.cloud.datacatalog.v1.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public Builder mergeSchema(com.google.cloud.datacatalog.v1.Schema value) { + if (schemaBuilder_ == null) { + if (schema_ != null) { + schema_ = + com.google.cloud.datacatalog.v1.Schema.newBuilder(schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + schemaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = null; + onChanged(); + } else { + schema_ = null; + schemaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.v1.Schema.Builder getSchemaBuilder() { + + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + public com.google.cloud.datacatalog.v1.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.datacatalog.v1.Schema.getDefaultInstance() + : schema_; + } + } + /** + * + * + *
+     * Schema of the entry. An entry might not have any schema attached to it.
+     * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Schema, + com.google.cloud.datacatalog.v1.Schema.Builder, + com.google.cloud.datacatalog.v1.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Schema, + com.google.cloud.datacatalog.v1.Schema.Builder, + com.google.cloud.datacatalog.v1.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private com.google.cloud.datacatalog.v1.SystemTimestamps sourceSystemTimestamps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + sourceSystemTimestampsBuilder_; + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return Whether the sourceSystemTimestamps field is set. + */ + public boolean hasSourceSystemTimestamps() { + return sourceSystemTimestampsBuilder_ != null || sourceSystemTimestamps_ != null; + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return The sourceSystemTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getSourceSystemTimestamps() { + if (sourceSystemTimestampsBuilder_ == null) { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } else { + return sourceSystemTimestampsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder setSourceSystemTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (sourceSystemTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceSystemTimestamps_ = value; + onChanged(); + } else { + sourceSystemTimestampsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder setSourceSystemTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue) { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = builderForValue.build(); + onChanged(); + } else { + sourceSystemTimestampsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder mergeSourceSystemTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (sourceSystemTimestampsBuilder_ == null) { + if (sourceSystemTimestamps_ != null) { + sourceSystemTimestamps_ = + com.google.cloud.datacatalog.v1.SystemTimestamps.newBuilder(sourceSystemTimestamps_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceSystemTimestamps_ = value; + } + onChanged(); + } else { + sourceSystemTimestampsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public Builder clearSourceSystemTimestamps() { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestamps_ = null; + onChanged(); + } else { + sourceSystemTimestamps_ = null; + sourceSystemTimestampsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps.Builder + getSourceSystemTimestampsBuilder() { + + onChanged(); + return getSourceSystemTimestampsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getSourceSystemTimestampsOrBuilder() { + if (sourceSystemTimestampsBuilder_ != null) { + return sourceSystemTimestampsBuilder_.getMessageOrBuilder(); + } else { + return sourceSystemTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : sourceSystemTimestamps_; + } + } + /** + * + * + *
+     * Timestamps about the underlying resource, not about this Data Catalog
+     * entry. Output only when Entry is of type in the EntryType enum. For entries
+     * with user_specified_type, this field is optional and defaults to an empty
+     * timestamp.
+     * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + getSourceSystemTimestampsFieldBuilder() { + if (sourceSystemTimestampsBuilder_ == null) { + sourceSystemTimestampsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder>( + getSourceSystemTimestamps(), getParentForChildren(), isClean()); + sourceSystemTimestamps_ = null; + } + return sourceSystemTimestampsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.Entry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.Entry) + private static final com.google.cloud.datacatalog.v1.Entry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.Entry(); + } + + public static com.google.cloud.datacatalog.v1.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java new file mode 100644 index 00000000..b15ebf84 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java @@ -0,0 +1,1337 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * EntryGroup Metadata.
+ * An EntryGroup resource represents a logical grouping of zero or more
+ * Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.EntryGroup} + */ +public final class EntryGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.EntryGroup) + EntryGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntryGroup.newBuilder() to construct. + private EntryGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EntryGroup() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EntryGroup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EntryGroup( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.SystemTimestamps.Builder subBuilder = null; + if (dataCatalogTimestamps_ != null) { + subBuilder = dataCatalogTimestamps_.toBuilder(); + } + dataCatalogTimestamps_ = + input.readMessage( + com.google.cloud.datacatalog.v1.SystemTimestamps.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataCatalogTimestamps_); + dataCatalogTimestamps_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_EntryGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.EntryGroup.class, + com.google.cloud.datacatalog.v1.EntryGroup.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the entry group in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + 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 resource name of the entry group in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + 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_; + /** + * + * + *
+   * A short name to identify the entry group, for example,
+   * "analytics data - jan 2011". Default value is an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+   * A short name to identify the entry group, for example,
+   * "analytics data - jan 2011". Default value is an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + 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_; + /** + * + * + *
+   * Entry group description, which can consist of several sentences or
+   * paragraphs that describe entry group contents. Default value is an empty
+   * string.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+   * Entry group description, which can consist of several sentences or
+   * paragraphs that describe entry group contents. Default value is an empty
+   * string.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + 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 DATA_CATALOG_TIMESTAMPS_FIELD_NUMBER = 4; + private com.google.cloud.datacatalog.v1.SystemTimestamps dataCatalogTimestamps_; + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataCatalogTimestamps field is set. + */ + public boolean hasDataCatalogTimestamps() { + return dataCatalogTimestamps_ != null; + } + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataCatalogTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getDataCatalogTimestamps() { + return dataCatalogTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : dataCatalogTimestamps_; + } + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getDataCatalogTimestampsOrBuilder() { + return getDataCatalogTimestamps(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (dataCatalogTimestamps_ != null) { + output.writeMessage(4, getDataCatalogTimestamps()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (dataCatalogTimestamps_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDataCatalogTimestamps()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.EntryGroup)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.EntryGroup other = + (com.google.cloud.datacatalog.v1.EntryGroup) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDataCatalogTimestamps() != other.hasDataCatalogTimestamps()) return false; + if (hasDataCatalogTimestamps()) { + if (!getDataCatalogTimestamps().equals(other.getDataCatalogTimestamps())) return false; + } + if (!unknownFields.equals(other.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 (hasDataCatalogTimestamps()) { + hash = (37 * hash) + DATA_CATALOG_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getDataCatalogTimestamps().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.EntryGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * EntryGroup Metadata.
+   * An EntryGroup resource represents a logical grouping of zero or more
+   * Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.EntryGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.EntryGroup) + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_EntryGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.EntryGroup.class, + com.google.cloud.datacatalog.v1.EntryGroup.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.EntryGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (dataCatalogTimestampsBuilder_ == null) { + dataCatalogTimestamps_ = null; + } else { + dataCatalogTimestamps_ = null; + dataCatalogTimestampsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.EntryGroup getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.EntryGroup build() { + com.google.cloud.datacatalog.v1.EntryGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.EntryGroup buildPartial() { + com.google.cloud.datacatalog.v1.EntryGroup result = + new com.google.cloud.datacatalog.v1.EntryGroup(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (dataCatalogTimestampsBuilder_ == null) { + result.dataCatalogTimestamps_ = dataCatalogTimestamps_; + } else { + result.dataCatalogTimestamps_ = dataCatalogTimestampsBuilder_.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.cloud.datacatalog.v1.EntryGroup) { + return mergeFrom((com.google.cloud.datacatalog.v1.EntryGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.EntryGroup other) { + if (other == com.google.cloud.datacatalog.v1.EntryGroup.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.hasDataCatalogTimestamps()) { + mergeDataCatalogTimestamps(other.getDataCatalogTimestamps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.EntryGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.EntryGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the entry group in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this 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 resource name of the entry group in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this 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 resource name of the entry group in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this 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 resource name of the entry group in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the entry group in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * Note that this EntryGroup and its child resources may not actually be
+     * stored in the location in this 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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * A short name to identify the entry group, for example,
+     * "analytics data - jan 2011". Default value is an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A short name to identify the entry group, for example,
+     * "analytics data - jan 2011". Default value is an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A short name to identify the entry group, for example,
+     * "analytics data - jan 2011". Default value is an empty string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A short name to identify the entry group, for example,
+     * "analytics data - jan 2011". Default value is an empty string.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A short name to identify the entry group, for example,
+     * "analytics data - jan 2011". Default value is an empty string.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Entry group description, which can consist of several sentences or
+     * paragraphs that describe entry group contents. Default value is an empty
+     * string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Entry group description, which can consist of several sentences or
+     * paragraphs that describe entry group contents. Default value is an empty
+     * string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Entry group description, which can consist of several sentences or
+     * paragraphs that describe entry group contents. Default value is an empty
+     * string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Entry group description, which can consist of several sentences or
+     * paragraphs that describe entry group contents. Default value is an empty
+     * string.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Entry group description, which can consist of several sentences or
+     * paragraphs that describe entry group contents. Default value is an empty
+     * string.
+     * 
+ * + * 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.cloud.datacatalog.v1.SystemTimestamps dataCatalogTimestamps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + dataCatalogTimestampsBuilder_; + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataCatalogTimestamps field is set. + */ + public boolean hasDataCatalogTimestamps() { + return dataCatalogTimestampsBuilder_ != null || dataCatalogTimestamps_ != null; + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataCatalogTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getDataCatalogTimestamps() { + if (dataCatalogTimestampsBuilder_ == null) { + return dataCatalogTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : dataCatalogTimestamps_; + } else { + return dataCatalogTimestampsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataCatalogTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (dataCatalogTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataCatalogTimestamps_ = value; + onChanged(); + } else { + dataCatalogTimestampsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataCatalogTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue) { + if (dataCatalogTimestampsBuilder_ == null) { + dataCatalogTimestamps_ = builderForValue.build(); + onChanged(); + } else { + dataCatalogTimestampsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDataCatalogTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (dataCatalogTimestampsBuilder_ == null) { + if (dataCatalogTimestamps_ != null) { + dataCatalogTimestamps_ = + com.google.cloud.datacatalog.v1.SystemTimestamps.newBuilder(dataCatalogTimestamps_) + .mergeFrom(value) + .buildPartial(); + } else { + dataCatalogTimestamps_ = value; + } + onChanged(); + } else { + dataCatalogTimestampsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDataCatalogTimestamps() { + if (dataCatalogTimestampsBuilder_ == null) { + dataCatalogTimestamps_ = null; + onChanged(); + } else { + dataCatalogTimestamps_ = null; + dataCatalogTimestampsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps.Builder + getDataCatalogTimestampsBuilder() { + + onChanged(); + return getDataCatalogTimestampsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getDataCatalogTimestampsOrBuilder() { + if (dataCatalogTimestampsBuilder_ != null) { + return dataCatalogTimestampsBuilder_.getMessageOrBuilder(); + } else { + return dataCatalogTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : dataCatalogTimestamps_; + } + } + /** + * + * + *
+     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + getDataCatalogTimestampsFieldBuilder() { + if (dataCatalogTimestampsBuilder_ == null) { + dataCatalogTimestampsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder>( + getDataCatalogTimestamps(), getParentForChildren(), isClean()); + dataCatalogTimestamps_ = null; + } + return dataCatalogTimestampsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.EntryGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.EntryGroup) + private static final com.google.cloud.datacatalog.v1.EntryGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.EntryGroup(); + } + + public static com.google.cloud.datacatalog.v1.EntryGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntryGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntryGroup(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.EntryGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupName.java new file mode 100644 index 00000000..510a55b2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupName.java @@ -0,0 +1,211 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class EntryGroupName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entryGroups/{entry_group}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String entryGroup; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private EntryGroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + entryGroup = Preconditions.checkNotNull(builder.getEntryGroup()); + } + + public static EntryGroupName of(String project, String location, String entryGroup) { + return newBuilder().setProject(project).setLocation(location).setEntryGroup(entryGroup).build(); + } + + public static String format(String project, String location, String entryGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .build() + .toString(); + } + + public static EntryGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "EntryGroupName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("entry_group")); + } + + 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 (EntryGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("entryGroup", entryGroup); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "entry_group", entryGroup); + } + + /** Builder for EntryGroupName. */ + public static class Builder { + + private String project; + private String location; + private String entryGroup; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEntryGroup(String entryGroup) { + this.entryGroup = entryGroup; + return this; + } + + private Builder() {} + + private Builder(EntryGroupName entryGroupName) { + project = entryGroupName.project; + location = entryGroupName.location; + entryGroup = entryGroupName.entryGroup; + } + + public EntryGroupName build() { + return new EntryGroupName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof EntryGroupName) { + EntryGroupName that = (EntryGroupName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.entryGroup.equals(that.entryGroup)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= entryGroup.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java new file mode 100644 index 00000000..4a2fe873 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface EntryGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.EntryGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the entry group in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the entry group in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * Note that this EntryGroup and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A short name to identify the entry group, for example,
+   * "analytics data - jan 2011". Default value is an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * A short name to identify the entry group, for example,
+   * "analytics data - jan 2011". Default value is an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Entry group description, which can consist of several sentences or
+   * paragraphs that describe entry group contents. Default value is an empty
+   * string.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Entry group description, which can consist of several sentences or
+   * paragraphs that describe entry group contents. Default value is an empty
+   * string.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataCatalogTimestamps field is set. + */ + boolean hasDataCatalogTimestamps(); + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataCatalogTimestamps. + */ + com.google.cloud.datacatalog.v1.SystemTimestamps getDataCatalogTimestamps(); + /** + * + * + *
+   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps data_catalog_timestamps = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getDataCatalogTimestampsOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryName.java new file mode 100644 index 00000000..c51d5f33 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryName.java @@ -0,0 +1,242 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class EntryName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String entryGroup; + private final String entry; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private EntryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + entryGroup = Preconditions.checkNotNull(builder.getEntryGroup()); + entry = Preconditions.checkNotNull(builder.getEntry()); + } + + public static EntryName of(String project, String location, String entryGroup, String entry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .build(); + } + + public static String format(String project, String location, String entryGroup, String entry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .build() + .toString(); + } + + public static EntryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "EntryName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("entry_group"), + matchMap.get("entry")); + } + + 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 (EntryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("entryGroup", entryGroup); + fieldMapBuilder.put("entry", entry); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "entry_group", entryGroup, "entry", entry); + } + + /** Builder for EntryName. */ + public static class Builder { + + private String project; + private String location; + private String entryGroup; + private String entry; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEntryGroup(String entryGroup) { + this.entryGroup = entryGroup; + return this; + } + + public Builder setEntry(String entry) { + this.entry = entry; + return this; + } + + private Builder() {} + + private Builder(EntryName entryName) { + project = entryName.project; + location = entryName.location; + entryGroup = entryName.entryGroup; + entry = entryName.entry; + } + + public EntryName build() { + return new EntryName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof EntryName) { + EntryName that = (EntryName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.entryGroup.equals(that.entryGroup)) + && (this.entry.equals(that.entry)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= entryGroup.hashCode(); + h *= 1000003; + h ^= entry.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java new file mode 100644 index 00000000..c0b5a994 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java @@ -0,0 +1,491 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface EntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Data Catalog resource name of the entry in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The Data Catalog resource name of the entry in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * Note that this Entry and its child resources may not actually be stored in
+   * the location in this name.
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The resource this metadata entry refers to.
+   * For Google Cloud Platform resources, `linked_resource` is the [full name of
+   * the
+   * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   * Output only when Entry is of type in the EntryType enum. For entries with
+   * user_specified_type, this field is optional and defaults to an empty
+   * string.
+   * 
+ * + * string linked_resource = 9; + * + * @return The linkedResource. + */ + java.lang.String getLinkedResource(); + /** + * + * + *
+   * The resource this metadata entry refers to.
+   * For Google Cloud Platform resources, `linked_resource` is the [full name of
+   * the
+   * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name).
+   * For example, the `linked_resource` for a table resource from BigQuery is:
+   * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   * Output only when Entry is of type in the EntryType enum. For entries with
+   * user_specified_type, this field is optional and defaults to an empty
+   * string.
+   * 
+ * + * string linked_resource = 9; + * + * @return The bytes for linkedResource. + */ + com.google.protobuf.ByteString getLinkedResourceBytes(); + + /** + * + * + *
+   * The type of the entry.
+   * Only used for Entries with types in the EntryType enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of the entry.
+   * Only used for Entries with types in the EntryType enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The type. + */ + com.google.cloud.datacatalog.v1.EntryType getType(); + + /** + * + * + *
+   * Entry type if it does not fit any of the input-allowed values listed in
+   * `EntryType` enum above. When creating an entry, users should check the
+   * enum values first, if nothing matches the entry to be created, then
+   * provide a custom value, for example "my_special_type".
+   * `user_specified_type` strings must begin with a letter or underscore and
+   * can only contain letters, numbers, and underscores; are case insensitive;
+   * must be at least 1 character and at most 64 characters long.
+   * Currently, only FILESET enum value is allowed. All other entries created
+   * through Data Catalog must use `user_specified_type`.
+   * 
+ * + * string user_specified_type = 16; + * + * @return The userSpecifiedType. + */ + java.lang.String getUserSpecifiedType(); + /** + * + * + *
+   * Entry type if it does not fit any of the input-allowed values listed in
+   * `EntryType` enum above. When creating an entry, users should check the
+   * enum values first, if nothing matches the entry to be created, then
+   * provide a custom value, for example "my_special_type".
+   * `user_specified_type` strings must begin with a letter or underscore and
+   * can only contain letters, numbers, and underscores; are case insensitive;
+   * must be at least 1 character and at most 64 characters long.
+   * Currently, only FILESET enum value is allowed. All other entries created
+   * through Data Catalog must use `user_specified_type`.
+   * 
+ * + * string user_specified_type = 16; + * + * @return The bytes for userSpecifiedType. + */ + com.google.protobuf.ByteString getUserSpecifiedTypeBytes(); + + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + int getIntegratedSystemValue(); + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem(); + + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with. `user_specified_system` strings must begin with a letter
+   * or underscore and can only contain letters, numbers, and underscores; are
+   * case insensitive; must be at least 1 character and at most 64 characters
+   * long.
+   * 
+ * + * string user_specified_system = 18; + * + * @return The userSpecifiedSystem. + */ + java.lang.String getUserSpecifiedSystem(); + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with. `user_specified_system` strings must begin with a letter
+   * or underscore and can only contain letters, numbers, and underscores; are
+   * case insensitive; must be at least 1 character and at most 64 characters
+   * long.
+   * 
+ * + * string user_specified_system = 18; + * + * @return The bytes for userSpecifiedSystem. + */ + com.google.protobuf.ByteString getUserSpecifiedSystemBytes(); + + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return Whether the gcsFilesetSpec field is set. + */ + boolean hasGcsFilesetSpec(); + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + * + * @return The gcsFilesetSpec. + */ + com.google.cloud.datacatalog.v1.GcsFilesetSpec getGcsFilesetSpec(); + /** + * + * + *
+   * Specification that applies to a Cloud Storage fileset. This is only valid
+   * on entries of type FILESET.
+   * 
+ * + * .google.cloud.datacatalog.v1.GcsFilesetSpec gcs_fileset_spec = 6; + */ + com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder getGcsFilesetSpecOrBuilder(); + + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return Whether the bigqueryTableSpec field is set. + */ + boolean hasBigqueryTableSpec(); + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + * + * @return The bigqueryTableSpec. + */ + com.google.cloud.datacatalog.v1.BigQueryTableSpec getBigqueryTableSpec(); + /** + * + * + *
+   * Specification that applies to a BigQuery table. This is only valid on
+   * entries of type `TABLE`.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryTableSpec bigquery_table_spec = 12; + */ + com.google.cloud.datacatalog.v1.BigQueryTableSpecOrBuilder getBigqueryTableSpecOrBuilder(); + + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return Whether the bigqueryDateShardedSpec field is set. + */ + boolean hasBigqueryDateShardedSpec(); + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + * + * @return The bigqueryDateShardedSpec. + */ + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getBigqueryDateShardedSpec(); + /** + * + * + *
+   * Specification for a group of BigQuery tables with name pattern
+   * `[prefix]YYYYMMDD`. Context:
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding.
+   * 
+ * + * .google.cloud.datacatalog.v1.BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + * + */ + com.google.cloud.datacatalog.v1.BigQueryDateShardedSpecOrBuilder + getBigqueryDateShardedSpecOrBuilder(); + + /** + * + * + *
+   * Display information such as title and description. A short name to identify
+   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+   * empty string.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display information such as title and description. A short name to identify
+   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
+   * empty string.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents. Default value is an empty string.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Entry description, which can consist of several sentences or paragraphs
+   * that describe entry contents. Default value is an empty string.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + * + * @return The schema. + */ + com.google.cloud.datacatalog.v1.Schema getSchema(); + /** + * + * + *
+   * Schema of the entry. An entry might not have any schema attached to it.
+   * 
+ * + * .google.cloud.datacatalog.v1.Schema schema = 5; + */ + com.google.cloud.datacatalog.v1.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return Whether the sourceSystemTimestamps field is set. + */ + boolean hasSourceSystemTimestamps(); + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + * + * @return The sourceSystemTimestamps. + */ + com.google.cloud.datacatalog.v1.SystemTimestamps getSourceSystemTimestamps(); + /** + * + * + *
+   * Timestamps about the underlying resource, not about this Data Catalog
+   * entry. Output only when Entry is of type in the EntryType enum. For entries
+   * with user_specified_type, this field is optional and defaults to an empty
+   * timestamp.
+   * 
+ * + * .google.cloud.datacatalog.v1.SystemTimestamps source_system_timestamps = 7; + */ + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getSourceSystemTimestampsOrBuilder(); + + public com.google.cloud.datacatalog.v1.Entry.EntryTypeCase getEntryTypeCase(); + + public com.google.cloud.datacatalog.v1.Entry.SystemCase getSystemCase(); + + public com.google.cloud.datacatalog.v1.Entry.TypeSpecCase getTypeSpecCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java new file mode 100644 index 00000000..2329827a --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java @@ -0,0 +1,226 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Entry resources in Data Catalog can be of different types e.g. a BigQuery
+ * Table entry is of type `TABLE`. This enum describes all the possible types
+ * Data Catalog contains.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1.EntryType} + */ +public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * ENTRY_TYPE_UNSPECIFIED = 0; + */ + ENTRY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Output only. The type of entry that has a GoogleSQL schema, including
+   * logical views.
+   * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + * + * + *
+   * Output only. The type of models, examples include
+   * https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro
+   * 
+ * + * MODEL = 5; + */ + MODEL(5), + /** + * + * + *
+   * Output only. An entry type which is used for streaming entries. Example:
+   * Pub/Sub topic.
+   * 
+ * + * DATA_STREAM = 3; + */ + DATA_STREAM(3), + /** + * + * + *
+   * An entry type which is a set of files or objects. Example:
+   * Cloud Storage fileset.
+   * 
+ * + * FILESET = 4; + */ + FILESET(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * ENTRY_TYPE_UNSPECIFIED = 0; + */ + public static final int ENTRY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Output only. The type of entry that has a GoogleSQL schema, including
+   * logical views.
+   * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + * + * + *
+   * Output only. The type of models, examples include
+   * https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro
+   * 
+ * + * MODEL = 5; + */ + public static final int MODEL_VALUE = 5; + /** + * + * + *
+   * Output only. An entry type which is used for streaming entries. Example:
+   * Pub/Sub topic.
+   * 
+ * + * DATA_STREAM = 3; + */ + public static final int DATA_STREAM_VALUE = 3; + /** + * + * + *
+   * An entry type which is a set of files or objects. Example:
+   * Cloud Storage fileset.
+   * 
+ * + * FILESET = 4; + */ + public static final int FILESET_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 EntryType 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 EntryType forNumber(int value) { + switch (value) { + case 0: + return ENTRY_TYPE_UNSPECIFIED; + case 2: + return TABLE; + case 5: + return MODEL; + case 3: + return DATA_STREAM; + case 4: + return FILESET; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EntryType findValueByNumber(int number) { + return EntryType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.cloud.datacatalog.v1.Datacatalog.getDescriptor().getEnumTypes().get(0); + } + + private static final EntryType[] VALUES = values(); + + public static EntryType 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 EntryType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.EntryType) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java new file mode 100644 index 00000000..1c116f6a --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java @@ -0,0 +1,3009 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +/** Protobuf type {@code google.cloud.datacatalog.v1.FieldType} */ +public final class FieldType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.FieldType) + FieldTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldType.newBuilder() to construct. + private FieldType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FieldType() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FieldType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FieldType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder 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(); + typeDeclCase_ = 1; + typeDecl_ = rawValue; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder subBuilder = null; + if (typeDeclCase_ == 2) { + subBuilder = + ((com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_).toBuilder(); + } + typeDecl_ = + input.readMessage( + com.google.cloud.datacatalog.v1.FieldType.EnumType.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_); + typeDecl_ = subBuilder.buildPartial(); + } + typeDeclCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.class, + com.google.cloud.datacatalog.v1.FieldType.Builder.class); + } + + /** Protobuf enum {@code google.cloud.datacatalog.v1.FieldType.PrimitiveType} */ + public enum PrimitiveType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This is the default invalid value for a type.
+     * 
+ * + * PRIMITIVE_TYPE_UNSPECIFIED = 0; + */ + PRIMITIVE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A double precision number.
+     * 
+ * + * DOUBLE = 1; + */ + DOUBLE(1), + /** + * + * + *
+     * An UTF-8 string.
+     * 
+ * + * STRING = 2; + */ + STRING(2), + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * BOOL = 3; + */ + BOOL(3), + /** + * + * + *
+     * A timestamp.
+     * 
+ * + * TIMESTAMP = 4; + */ + TIMESTAMP(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * This is the default invalid value for a type.
+     * 
+ * + * PRIMITIVE_TYPE_UNSPECIFIED = 0; + */ + public static final int PRIMITIVE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A double precision number.
+     * 
+ * + * DOUBLE = 1; + */ + public static final int DOUBLE_VALUE = 1; + /** + * + * + *
+     * An UTF-8 string.
+     * 
+ * + * STRING = 2; + */ + public static final int STRING_VALUE = 2; + /** + * + * + *
+     * A boolean value.
+     * 
+ * + * BOOL = 3; + */ + public static final int BOOL_VALUE = 3; + /** + * + * + *
+     * A timestamp.
+     * 
+ * + * TIMESTAMP = 4; + */ + public static final int TIMESTAMP_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 PrimitiveType 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 PrimitiveType forNumber(int value) { + switch (value) { + case 0: + return PRIMITIVE_TYPE_UNSPECIFIED; + case 1: + return DOUBLE; + case 2: + return STRING; + case 3: + return BOOL; + case 4: + return TIMESTAMP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PrimitiveType findValueByNumber(int number) { + return PrimitiveType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.cloud.datacatalog.v1.FieldType.getDescriptor().getEnumTypes().get(0); + } + + private static final PrimitiveType[] VALUES = values(); + + public static PrimitiveType 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 PrimitiveType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.FieldType.PrimitiveType) + } + + public interface EnumTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.FieldType.EnumType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + java.util.List + getAllowedValuesList(); + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue getAllowedValues(int index); + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + int getAllowedValuesCount(); + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + java.util.List + getAllowedValuesOrBuilderList(); + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder getAllowedValuesOrBuilder( + int index); + } + /** Protobuf type {@code google.cloud.datacatalog.v1.FieldType.EnumType} */ + public static final class EnumType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.FieldType.EnumType) + EnumTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnumType.newBuilder() to construct. + private EnumType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnumType() { + allowedValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnumType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnumType( + 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)) { + allowedValues_ = + new java.util.ArrayList< + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue>(); + mutable_bitField0_ |= 0x00000001; + } + allowedValues_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedValues_ = java.util.Collections.unmodifiableList(allowedValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.EnumType.class, + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder.class); + } + + public interface EnumValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The display name of the enum value. Must not be an empty string.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * Required. The display name of the enum value. Must not be an empty string.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + } + /** Protobuf type {@code google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} */ + public static final class EnumValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + EnumValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnumValue.newBuilder() to construct. + private EnumValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnumValue() { + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnumValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnumValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.class, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+       * Required. The display name of the enum value. Must not be an empty string.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+       * Required. The display name of the enum value. Must not be an empty string.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue other = + (com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!unknownFields.equals(other.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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.class, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue build() { + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue buildPartial() { + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue result = + new com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue(this); + result.displayName_ = displayName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) { + return mergeFrom((com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue other) { + if (other + == com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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.cloud.datacatalog.v1.FieldType.EnumType.EnumValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+         * Required. The display name of the enum value. Must not be an empty string.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+         * Required. The display name of the enum value. Must not be an empty string.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+         * Required. The display name of the enum value. Must not be an empty string.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+         * Required. The display name of the enum value. Must not be an empty string.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The display name of the enum value. Must not be an empty string.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) + private static final com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue(); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnumValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnumValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALLOWED_VALUES_FIELD_NUMBER = 1; + private java.util.List + allowedValues_; + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public java.util.List + getAllowedValuesList() { + return allowedValues_; + } + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder> + getAllowedValuesOrBuilderList() { + return allowedValues_; + } + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public int getAllowedValuesCount() { + return allowedValues_.size(); + } + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue getAllowedValues( + int index) { + return allowedValues_.get(index); + } + /** + * + * + *
+     * Required on create; optional on update. The set of allowed values for
+     * this enum. This set must not be empty, the display names of the values in
+     * this set must not be empty and the display names of the values must be
+     * case-insensitively unique within this set. Currently, enum values can
+     * only be added to the list of allowed values. Deletion and renaming of
+     * enum values are not supported. Can have up to 500 allowed values.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder + getAllowedValuesOrBuilder(int index) { + return allowedValues_.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 < allowedValues_.size(); i++) { + output.writeMessage(1, allowedValues_.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 < allowedValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedValues_.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.cloud.datacatalog.v1.FieldType.EnumType)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.FieldType.EnumType other = + (com.google.cloud.datacatalog.v1.FieldType.EnumType) obj; + + if (!getAllowedValuesList().equals(other.getAllowedValuesList())) return false; + if (!unknownFields.equals(other.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 (getAllowedValuesCount() > 0) { + hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.FieldType.EnumType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.cloud.datacatalog.v1.FieldType.EnumType} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.FieldType.EnumType) + com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.EnumType.class, + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.FieldType.EnumType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (allowedValuesBuilder_ == null) { + allowedValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType build() { + com.google.cloud.datacatalog.v1.FieldType.EnumType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType buildPartial() { + com.google.cloud.datacatalog.v1.FieldType.EnumType result = + new com.google.cloud.datacatalog.v1.FieldType.EnumType(this); + int from_bitField0_ = bitField0_; + if (allowedValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedValues_ = java.util.Collections.unmodifiableList(allowedValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedValues_ = allowedValues_; + } else { + result.allowedValues_ = allowedValuesBuilder_.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.cloud.datacatalog.v1.FieldType.EnumType) { + return mergeFrom((com.google.cloud.datacatalog.v1.FieldType.EnumType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.FieldType.EnumType other) { + if (other == com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance()) + return this; + if (allowedValuesBuilder_ == null) { + if (!other.allowedValues_.isEmpty()) { + if (allowedValues_.isEmpty()) { + allowedValues_ = other.allowedValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedValuesIsMutable(); + allowedValues_.addAll(other.allowedValues_); + } + onChanged(); + } + } else { + if (!other.allowedValues_.isEmpty()) { + if (allowedValuesBuilder_.isEmpty()) { + allowedValuesBuilder_.dispose(); + allowedValuesBuilder_ = null; + allowedValues_ = other.allowedValues_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedValuesFieldBuilder() + : null; + } else { + allowedValuesBuilder_.addAllMessages(other.allowedValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.FieldType.EnumType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.FieldType.EnumType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + allowedValues_ = java.util.Collections.emptyList(); + + private void ensureAllowedValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedValues_ = + new java.util.ArrayList( + allowedValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder> + allowedValuesBuilder_; + + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public java.util.List + getAllowedValuesList() { + if (allowedValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedValues_); + } else { + return allowedValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public int getAllowedValuesCount() { + if (allowedValuesBuilder_ == null) { + return allowedValues_.size(); + } else { + return allowedValuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue getAllowedValues( + int index) { + if (allowedValuesBuilder_ == null) { + return allowedValues_.get(index); + } else { + return allowedValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder setAllowedValues( + int index, com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.set(index, value); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder setAllowedValues( + int index, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder addAllowedValues( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.add(value); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder addAllowedValues( + int index, com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.add(index, value); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder addAllowedValues( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.add(builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder addAllowedValues( + int index, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder addAllAllowedValues( + java.lang.Iterable + values) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedValues_); + onChanged(); + } else { + allowedValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder clearAllowedValues() { + if (allowedValuesBuilder_ == null) { + allowedValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public Builder removeAllowedValues(int index) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.remove(index); + onChanged(); + } else { + allowedValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder + getAllowedValuesBuilder(int index) { + return getAllowedValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder + getAllowedValuesOrBuilder(int index) { + if (allowedValuesBuilder_ == null) { + return allowedValues_.get(index); + } else { + return allowedValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder> + getAllowedValuesOrBuilderList() { + if (allowedValuesBuilder_ != null) { + return allowedValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedValues_); + } + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder + addAllowedValuesBuilder() { + return getAllowedValuesFieldBuilder() + .addBuilder( + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.getDefaultInstance()); + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder + addAllowedValuesBuilder(int index) { + return getAllowedValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.getDefaultInstance()); + } + /** + * + * + *
+       * Required on create; optional on update. The set of allowed values for
+       * this enum. This set must not be empty, the display names of the values in
+       * this set must not be empty and the display names of the values must be
+       * case-insensitively unique within this set. Currently, enum values can
+       * only be added to the list of allowed values. Deletion and renaming of
+       * enum values are not supported. Can have up to 500 allowed values.
+       * 
+ * + * + * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; + * + */ + public java.util.List + getAllowedValuesBuilderList() { + return getAllowedValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder> + getAllowedValuesFieldBuilder() { + if (allowedValuesBuilder_ == null) { + allowedValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValueOrBuilder>( + allowedValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedValues_ = null; + } + return allowedValuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.FieldType.EnumType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.FieldType.EnumType) + private static final com.google.cloud.datacatalog.v1.FieldType.EnumType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.FieldType.EnumType(); + } + + public static com.google.cloud.datacatalog.v1.FieldType.EnumType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnumType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnumType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType.EnumType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int typeDeclCase_ = 0; + private java.lang.Object typeDecl_; + + public enum TypeDeclCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRIMITIVE_TYPE(1), + ENUM_TYPE(2), + TYPEDECL_NOT_SET(0); + private final int value; + + private TypeDeclCase(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 TypeDeclCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDeclCase forNumber(int value) { + switch (value) { + case 1: + return PRIMITIVE_TYPE; + case 2: + return ENUM_TYPE; + case 0: + return TYPEDECL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDeclCase getTypeDeclCase() { + return TypeDeclCase.forNumber(typeDeclCase_); + } + + public static final int PRIMITIVE_TYPE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Represents primitive types - string, bool etc.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The enum numeric value on the wire for primitiveType. + */ + public int getPrimitiveTypeValue() { + if (typeDeclCase_ == 1) { + return (java.lang.Integer) typeDecl_; + } + return 0; + } + /** + * + * + *
+   * Represents primitive types - string, bool etc.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The primitiveType. + */ + public com.google.cloud.datacatalog.v1.FieldType.PrimitiveType getPrimitiveType() { + if (typeDeclCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.FieldType.PrimitiveType result = + com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.valueOf( + (java.lang.Integer) typeDecl_); + return result == null + ? com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.PRIMITIVE_TYPE_UNSPECIFIED; + } + + public static final int ENUM_TYPE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return Whether the enumType field is set. + */ + public boolean hasEnumType() { + return typeDeclCase_ == 2; + } + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return The enumType. + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType getEnumType() { + if (typeDeclCase_ == 2) { + return (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_; + } + return com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder getEnumTypeOrBuilder() { + if (typeDeclCase_ == 2) { + return (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_; + } + return com.google.cloud.datacatalog.v1.FieldType.EnumType.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 (typeDeclCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) typeDecl_)); + } + if (typeDeclCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeDeclCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(1, ((java.lang.Integer) typeDecl_)); + } + if (typeDeclCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.FieldType)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.FieldType other = + (com.google.cloud.datacatalog.v1.FieldType) obj; + + if (!getTypeDeclCase().equals(other.getTypeDeclCase())) return false; + switch (typeDeclCase_) { + case 1: + if (getPrimitiveTypeValue() != other.getPrimitiveTypeValue()) return false; + break; + case 2: + if (!getEnumType().equals(other.getEnumType())) 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 (typeDeclCase_) { + case 1: + hash = (37 * hash) + PRIMITIVE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPrimitiveTypeValue(); + break; + case 2: + hash = (37 * hash) + ENUM_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEnumType().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.FieldType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.FieldType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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.cloud.datacatalog.v1.FieldType} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.FieldType) + com.google.cloud.datacatalog.v1.FieldTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.FieldType.class, + com.google.cloud.datacatalog.v1.FieldType.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.FieldType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + typeDeclCase_ = 0; + typeDecl_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_FieldType_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.FieldType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType build() { + com.google.cloud.datacatalog.v1.FieldType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType buildPartial() { + com.google.cloud.datacatalog.v1.FieldType result = + new com.google.cloud.datacatalog.v1.FieldType(this); + if (typeDeclCase_ == 1) { + result.typeDecl_ = typeDecl_; + } + if (typeDeclCase_ == 2) { + if (enumTypeBuilder_ == null) { + result.typeDecl_ = typeDecl_; + } else { + result.typeDecl_ = enumTypeBuilder_.build(); + } + } + result.typeDeclCase_ = typeDeclCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.FieldType) { + return mergeFrom((com.google.cloud.datacatalog.v1.FieldType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.FieldType other) { + if (other == com.google.cloud.datacatalog.v1.FieldType.getDefaultInstance()) return this; + switch (other.getTypeDeclCase()) { + case PRIMITIVE_TYPE: + { + setPrimitiveTypeValue(other.getPrimitiveTypeValue()); + break; + } + case ENUM_TYPE: + { + mergeEnumType(other.getEnumType()); + break; + } + case TYPEDECL_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.cloud.datacatalog.v1.FieldType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.FieldType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int typeDeclCase_ = 0; + private java.lang.Object typeDecl_; + + public TypeDeclCase getTypeDeclCase() { + return TypeDeclCase.forNumber(typeDeclCase_); + } + + public Builder clearTypeDecl() { + typeDeclCase_ = 0; + typeDecl_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Represents primitive types - string, bool etc.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The enum numeric value on the wire for primitiveType. + */ + public int getPrimitiveTypeValue() { + if (typeDeclCase_ == 1) { + return ((java.lang.Integer) typeDecl_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Represents primitive types - string, bool etc.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @param value The enum numeric value on the wire for primitiveType to set. + * @return This builder for chaining. + */ + public Builder setPrimitiveTypeValue(int value) { + typeDeclCase_ = 1; + typeDecl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents primitive types - string, bool etc.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The primitiveType. + */ + public com.google.cloud.datacatalog.v1.FieldType.PrimitiveType getPrimitiveType() { + if (typeDeclCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.FieldType.PrimitiveType result = + com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.valueOf( + (java.lang.Integer) typeDecl_); + return result == null + ? com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.FieldType.PrimitiveType.PRIMITIVE_TYPE_UNSPECIFIED; + } + /** + * + * + *
+     * Represents primitive types - string, bool etc.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @param value The primitiveType to set. + * @return This builder for chaining. + */ + public Builder setPrimitiveType(com.google.cloud.datacatalog.v1.FieldType.PrimitiveType value) { + if (value == null) { + throw new NullPointerException(); + } + typeDeclCase_ = 1; + typeDecl_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents primitive types - string, bool etc.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrimitiveType() { + if (typeDeclCase_ == 1) { + typeDeclCase_ = 0; + typeDecl_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType, + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder> + enumTypeBuilder_; + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return Whether the enumType field is set. + */ + public boolean hasEnumType() { + return typeDeclCase_ == 2; + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return The enumType. + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType getEnumType() { + if (enumTypeBuilder_ == null) { + if (typeDeclCase_ == 2) { + return (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_; + } + return com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } else { + if (typeDeclCase_ == 2) { + return enumTypeBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public Builder setEnumType(com.google.cloud.datacatalog.v1.FieldType.EnumType value) { + if (enumTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDecl_ = value; + onChanged(); + } else { + enumTypeBuilder_.setMessage(value); + } + typeDeclCase_ = 2; + return this; + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public Builder setEnumType( + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder builderForValue) { + if (enumTypeBuilder_ == null) { + typeDecl_ = builderForValue.build(); + onChanged(); + } else { + enumTypeBuilder_.setMessage(builderForValue.build()); + } + typeDeclCase_ = 2; + return this; + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public Builder mergeEnumType(com.google.cloud.datacatalog.v1.FieldType.EnumType value) { + if (enumTypeBuilder_ == null) { + if (typeDeclCase_ == 2 + && typeDecl_ + != com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance()) { + typeDecl_ = + com.google.cloud.datacatalog.v1.FieldType.EnumType.newBuilder( + (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDecl_ = value; + } + onChanged(); + } else { + if (typeDeclCase_ == 2) { + enumTypeBuilder_.mergeFrom(value); + } + enumTypeBuilder_.setMessage(value); + } + typeDeclCase_ = 2; + return this; + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public Builder clearEnumType() { + if (enumTypeBuilder_ == null) { + if (typeDeclCase_ == 2) { + typeDeclCase_ = 0; + typeDecl_ = null; + onChanged(); + } + } else { + if (typeDeclCase_ == 2) { + typeDeclCase_ = 0; + typeDecl_ = null; + } + enumTypeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder getEnumTypeBuilder() { + return getEnumTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + public com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder getEnumTypeOrBuilder() { + if ((typeDeclCase_ == 2) && (enumTypeBuilder_ != null)) { + return enumTypeBuilder_.getMessageOrBuilder(); + } else { + if (typeDeclCase_ == 2) { + return (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_; + } + return com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents an enum type.
+     * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType, + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder> + getEnumTypeFieldBuilder() { + if (enumTypeBuilder_ == null) { + if (!(typeDeclCase_ == 2)) { + typeDecl_ = com.google.cloud.datacatalog.v1.FieldType.EnumType.getDefaultInstance(); + } + enumTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType.EnumType, + com.google.cloud.datacatalog.v1.FieldType.EnumType.Builder, + com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder>( + (com.google.cloud.datacatalog.v1.FieldType.EnumType) typeDecl_, + getParentForChildren(), + isClean()); + typeDecl_ = null; + } + typeDeclCase_ = 2; + onChanged(); + ; + return enumTypeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.FieldType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.FieldType) + private static final com.google.cloud.datacatalog.v1.FieldType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.FieldType(); + } + + public static com.google.cloud.datacatalog.v1.FieldType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.FieldType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldTypeOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldTypeOrBuilder.java new file mode 100644 index 00000000..532173bd --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldTypeOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public interface FieldTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.FieldType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents primitive types - string, bool etc.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The enum numeric value on the wire for primitiveType. + */ + int getPrimitiveTypeValue(); + /** + * + * + *
+   * Represents primitive types - string, bool etc.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.PrimitiveType primitive_type = 1; + * + * @return The primitiveType. + */ + com.google.cloud.datacatalog.v1.FieldType.PrimitiveType getPrimitiveType(); + + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return Whether the enumType field is set. + */ + boolean hasEnumType(); + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + * + * @return The enumType. + */ + com.google.cloud.datacatalog.v1.FieldType.EnumType getEnumType(); + /** + * + * + *
+   * Represents an enum type.
+   * 
+ * + * .google.cloud.datacatalog.v1.FieldType.EnumType enum_type = 2; + */ + com.google.cloud.datacatalog.v1.FieldType.EnumTypeOrBuilder getEnumTypeOrBuilder(); + + public com.google.cloud.datacatalog.v1.FieldType.TypeDeclCase getTypeDeclCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpec.java new file mode 100644 index 00000000..e9976874 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpec.java @@ -0,0 +1,1019 @@ +/* + * 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/cloud/datacatalog/v1/gcs_fileset_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Specifications of a single file in Cloud Storage.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GcsFileSpec} + */ +public final class GcsFileSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GcsFileSpec) + GcsFileSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsFileSpec.newBuilder() to construct. + private GcsFileSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsFileSpec() { + filePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsFileSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsFileSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + filePath_ = s; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder subBuilder = null; + if (gcsTimestamps_ != null) { + subBuilder = gcsTimestamps_.toBuilder(); + } + gcsTimestamps_ = + input.readMessage( + com.google.cloud.datacatalog.v1.SystemTimestamps.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsTimestamps_); + gcsTimestamps_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + sizeBytes_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GcsFileSpec.class, + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder.class); + } + + public static final int FILE_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object filePath_; + /** + * + * + *
+   * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+   * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+   * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_TIMESTAMPS_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.SystemTimestamps gcsTimestamps_; + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsTimestamps field is set. + */ + public boolean hasGcsTimestamps() { + return gcsTimestamps_ != null; + } + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getGcsTimestamps() { + return gcsTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : gcsTimestamps_; + } + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getGcsTimestampsOrBuilder() { + return getGcsTimestamps(); + } + + public static final int SIZE_BYTES_FIELD_NUMBER = 4; + private long sizeBytes_; + /** + * + * + *
+   * Output only. The size of the file, in bytes.
+   * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + public long getSizeBytes() { + return sizeBytes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getFilePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); + } + if (gcsTimestamps_ != null) { + output.writeMessage(2, getGcsTimestamps()); + } + if (sizeBytes_ != 0L) { + output.writeInt64(4, sizeBytes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFilePathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); + } + if (gcsTimestamps_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGcsTimestamps()); + } + if (sizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, sizeBytes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.GcsFileSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GcsFileSpec other = + (com.google.cloud.datacatalog.v1.GcsFileSpec) obj; + + if (!getFilePath().equals(other.getFilePath())) return false; + if (hasGcsTimestamps() != other.hasGcsTimestamps()) return false; + if (hasGcsTimestamps()) { + if (!getGcsTimestamps().equals(other.getGcsTimestamps())) return false; + } + if (getSizeBytes() != other.getSizeBytes()) return false; + if (!unknownFields.equals(other.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_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + if (hasGcsTimestamps()) { + hash = (37 * hash) + GCS_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getGcsTimestamps().hashCode(); + } + hash = (37 * hash) + SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeBytes()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GcsFileSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifications of a single file in Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GcsFileSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GcsFileSpec) + com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GcsFileSpec.class, + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GcsFileSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + filePath_ = ""; + + if (gcsTimestampsBuilder_ == null) { + gcsTimestamps_ = null; + } else { + gcsTimestamps_ = null; + gcsTimestampsBuilder_ = null; + } + sizeBytes_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFileSpec build() { + com.google.cloud.datacatalog.v1.GcsFileSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFileSpec buildPartial() { + com.google.cloud.datacatalog.v1.GcsFileSpec result = + new com.google.cloud.datacatalog.v1.GcsFileSpec(this); + result.filePath_ = filePath_; + if (gcsTimestampsBuilder_ == null) { + result.gcsTimestamps_ = gcsTimestamps_; + } else { + result.gcsTimestamps_ = gcsTimestampsBuilder_.build(); + } + result.sizeBytes_ = sizeBytes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.GcsFileSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.GcsFileSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GcsFileSpec other) { + if (other == com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance()) return this; + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + onChanged(); + } + if (other.hasGcsTimestamps()) { + mergeGcsTimestamps(other.getGcsTimestamps()); + } + if (other.getSizeBytes() != 0L) { + setSizeBytes(other.getSizeBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.GcsFileSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.GcsFileSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object filePath_ = ""; + /** + * + * + *
+     * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+     * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+     * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+     * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filePath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+     * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilePath() { + + filePath_ = getDefaultInstance().getFilePath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+     * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filePath_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.SystemTimestamps gcsTimestamps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + gcsTimestampsBuilder_; + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsTimestamps field is set. + */ + public boolean hasGcsTimestamps() { + return gcsTimestampsBuilder_ != null || gcsTimestamps_ != null; + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getGcsTimestamps() { + if (gcsTimestampsBuilder_ == null) { + return gcsTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : gcsTimestamps_; + } else { + return gcsTimestampsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (gcsTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsTimestamps_ = value; + onChanged(); + } else { + gcsTimestampsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcsTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue) { + if (gcsTimestampsBuilder_ == null) { + gcsTimestamps_ = builderForValue.build(); + onChanged(); + } else { + gcsTimestampsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGcsTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (gcsTimestampsBuilder_ == null) { + if (gcsTimestamps_ != null) { + gcsTimestamps_ = + com.google.cloud.datacatalog.v1.SystemTimestamps.newBuilder(gcsTimestamps_) + .mergeFrom(value) + .buildPartial(); + } else { + gcsTimestamps_ = value; + } + onChanged(); + } else { + gcsTimestampsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGcsTimestamps() { + if (gcsTimestampsBuilder_ == null) { + gcsTimestamps_ = null; + onChanged(); + } else { + gcsTimestamps_ = null; + gcsTimestampsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps.Builder getGcsTimestampsBuilder() { + + onChanged(); + return getGcsTimestampsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getGcsTimestampsOrBuilder() { + if (gcsTimestampsBuilder_ != null) { + return gcsTimestampsBuilder_.getMessageOrBuilder(); + } else { + return gcsTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : gcsTimestamps_; + } + } + /** + * + * + *
+     * Output only. Timestamps about the Cloud Storage file.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + getGcsTimestampsFieldBuilder() { + if (gcsTimestampsBuilder_ == null) { + gcsTimestampsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder>( + getGcsTimestamps(), getParentForChildren(), isClean()); + gcsTimestamps_ = null; + } + return gcsTimestampsBuilder_; + } + + private long sizeBytes_; + /** + * + * + *
+     * Output only. The size of the file, in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + public long getSizeBytes() { + return sizeBytes_; + } + /** + * + * + *
+     * Output only. The size of the file, in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sizeBytes to set. + * @return This builder for chaining. + */ + public Builder setSizeBytes(long value) { + + sizeBytes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The size of the file, in bytes.
+     * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSizeBytes() { + + sizeBytes_ = 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.cloud.datacatalog.v1.GcsFileSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GcsFileSpec) + private static final com.google.cloud.datacatalog.v1.GcsFileSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GcsFileSpec(); + } + + public static com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsFileSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsFileSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFileSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpecOrBuilder.java new file mode 100644 index 00000000..448e1cba --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpecOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/datacatalog/v1/gcs_fileset_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface GcsFileSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GcsFileSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+   * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filePath. + */ + java.lang.String getFilePath(); + /** + * + * + *
+   * Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
+   * 
+ * + * string file_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filePath. + */ + com.google.protobuf.ByteString getFilePathBytes(); + + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcsTimestamps field is set. + */ + boolean hasGcsTimestamps(); + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcsTimestamps. + */ + com.google.cloud.datacatalog.v1.SystemTimestamps getGcsTimestamps(); + /** + * + * + *
+   * Output only. Timestamps about the Cloud Storage file.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SystemTimestamps gcs_timestamps = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getGcsTimestampsOrBuilder(); + + /** + * + * + *
+   * Output only. The size of the file, in bytes.
+   * 
+ * + * int64 size_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeBytes. + */ + long getSizeBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpec.java new file mode 100644 index 00000000..811a87a9 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpec.java @@ -0,0 +1,1574 @@ +/* + * 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/cloud/datacatalog/v1/gcs_fileset_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Describes a Cloud Storage fileset entry.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GcsFilesetSpec} + */ +public final class GcsFilesetSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GcsFilesetSpec) + GcsFilesetSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsFilesetSpec.newBuilder() to construct. + private GcsFilesetSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsFilesetSpec() { + filePatterns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + sampleGcsFileSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsFilesetSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsFilesetSpec( + 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)) { + filePatterns_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + filePatterns_.add(s); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + sampleGcsFileSpecs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + sampleGcsFileSpecs_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.GcsFileSpec.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + filePatterns_ = filePatterns_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + sampleGcsFileSpecs_ = java.util.Collections.unmodifiableList(sampleGcsFileSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GcsFilesetSpec.class, + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder.class); + } + + public static final int FILE_PATTERNS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList filePatterns_; + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the filePatterns. + */ + public com.google.protobuf.ProtocolStringList getFilePatternsList() { + return filePatterns_; + } + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of filePatterns. + */ + public int getFilePatternsCount() { + return filePatterns_.size(); + } + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The filePatterns at the given index. + */ + public java.lang.String getFilePatterns(int index) { + return filePatterns_.get(index); + } + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the filePatterns at the given index. + */ + public com.google.protobuf.ByteString getFilePatternsBytes(int index) { + return filePatterns_.getByteString(index); + } + + public static final int SAMPLE_GCS_FILE_SPECS_FIELD_NUMBER = 2; + private java.util.List sampleGcsFileSpecs_; + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSampleGcsFileSpecsList() { + return sampleGcsFileSpecs_; + } + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSampleGcsFileSpecsOrBuilderList() { + return sampleGcsFileSpecs_; + } + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSampleGcsFileSpecsCount() { + return sampleGcsFileSpecs_.size(); + } + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpec getSampleGcsFileSpecs(int index) { + return sampleGcsFileSpecs_.get(index); + } + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder getSampleGcsFileSpecsOrBuilder( + int index) { + return sampleGcsFileSpecs_.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 < filePatterns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePatterns_.getRaw(i)); + } + for (int i = 0; i < sampleGcsFileSpecs_.size(); i++) { + output.writeMessage(2, sampleGcsFileSpecs_.get(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 < filePatterns_.size(); i++) { + dataSize += computeStringSizeNoTag(filePatterns_.getRaw(i)); + } + size += dataSize; + size += 1 * getFilePatternsList().size(); + } + for (int i = 0; i < sampleGcsFileSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, sampleGcsFileSpecs_.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.cloud.datacatalog.v1.GcsFilesetSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GcsFilesetSpec other = + (com.google.cloud.datacatalog.v1.GcsFilesetSpec) obj; + + if (!getFilePatternsList().equals(other.getFilePatternsList())) return false; + if (!getSampleGcsFileSpecsList().equals(other.getSampleGcsFileSpecsList())) return false; + if (!unknownFields.equals(other.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 (getFilePatternsCount() > 0) { + hash = (37 * hash) + FILE_PATTERNS_FIELD_NUMBER; + hash = (53 * hash) + getFilePatternsList().hashCode(); + } + if (getSampleGcsFileSpecsCount() > 0) { + hash = (37 * hash) + SAMPLE_GCS_FILE_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getSampleGcsFileSpecsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GcsFilesetSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a Cloud Storage fileset entry.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GcsFilesetSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GcsFilesetSpec) + com.google.cloud.datacatalog.v1.GcsFilesetSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GcsFilesetSpec.class, + com.google.cloud.datacatalog.v1.GcsFilesetSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GcsFilesetSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSampleGcsFileSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + filePatterns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (sampleGcsFileSpecsBuilder_ == null) { + sampleGcsFileSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + sampleGcsFileSpecsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFilesetSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFilesetSpec build() { + com.google.cloud.datacatalog.v1.GcsFilesetSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFilesetSpec buildPartial() { + com.google.cloud.datacatalog.v1.GcsFilesetSpec result = + new com.google.cloud.datacatalog.v1.GcsFilesetSpec(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + filePatterns_ = filePatterns_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.filePatterns_ = filePatterns_; + if (sampleGcsFileSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + sampleGcsFileSpecs_ = java.util.Collections.unmodifiableList(sampleGcsFileSpecs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.sampleGcsFileSpecs_ = sampleGcsFileSpecs_; + } else { + result.sampleGcsFileSpecs_ = sampleGcsFileSpecsBuilder_.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.cloud.datacatalog.v1.GcsFilesetSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.GcsFilesetSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GcsFilesetSpec other) { + if (other == com.google.cloud.datacatalog.v1.GcsFilesetSpec.getDefaultInstance()) return this; + if (!other.filePatterns_.isEmpty()) { + if (filePatterns_.isEmpty()) { + filePatterns_ = other.filePatterns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFilePatternsIsMutable(); + filePatterns_.addAll(other.filePatterns_); + } + onChanged(); + } + if (sampleGcsFileSpecsBuilder_ == null) { + if (!other.sampleGcsFileSpecs_.isEmpty()) { + if (sampleGcsFileSpecs_.isEmpty()) { + sampleGcsFileSpecs_ = other.sampleGcsFileSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.addAll(other.sampleGcsFileSpecs_); + } + onChanged(); + } + } else { + if (!other.sampleGcsFileSpecs_.isEmpty()) { + if (sampleGcsFileSpecsBuilder_.isEmpty()) { + sampleGcsFileSpecsBuilder_.dispose(); + sampleGcsFileSpecsBuilder_ = null; + sampleGcsFileSpecs_ = other.sampleGcsFileSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + sampleGcsFileSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSampleGcsFileSpecsFieldBuilder() + : null; + } else { + sampleGcsFileSpecsBuilder_.addAllMessages(other.sampleGcsFileSpecs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.GcsFilesetSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.GcsFilesetSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList filePatterns_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFilePatternsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + filePatterns_ = new com.google.protobuf.LazyStringArrayList(filePatterns_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the filePatterns. + */ + public com.google.protobuf.ProtocolStringList getFilePatternsList() { + return filePatterns_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of filePatterns. + */ + public int getFilePatternsCount() { + return filePatterns_.size(); + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The filePatterns at the given index. + */ + public java.lang.String getFilePatterns(int index) { + return filePatterns_.get(index); + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the filePatterns at the given index. + */ + public com.google.protobuf.ByteString getFilePatternsBytes(int index) { + return filePatterns_.getByteString(index); + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The filePatterns to set. + * @return This builder for chaining. + */ + public Builder setFilePatterns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilePatternsIsMutable(); + filePatterns_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filePatterns to add. + * @return This builder for chaining. + */ + public Builder addFilePatterns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilePatternsIsMutable(); + filePatterns_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The filePatterns to add. + * @return This builder for chaining. + */ + public Builder addAllFilePatterns(java.lang.Iterable values) { + ensureFilePatternsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filePatterns_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilePatterns() { + filePatterns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+     * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+     * more information. Note that bucket wildcards are currently not supported.
+     * Examples of valid file_patterns:
+     *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+     *                              directory.
+     *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+     *                               spanning all subdirectories.
+     *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+     *                              `bucket_name`
+     *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+     *                               `.txt` in `bucket_name`
+     *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+     *                                    vowel character followed by `.txt` in
+     *                                    `bucket_name`
+     *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+     *                                  or `m` followed by `.txt` in `bucket_name`
+     *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+     *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+     *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+     * You can combine wildcards to provide more powerful matches, for example:
+     *  * `gs://bucket_name/[a-m]??.j*g`
+     * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the filePatterns to add. + * @return This builder for chaining. + */ + public Builder addFilePatternsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFilePatternsIsMutable(); + filePatterns_.add(value); + onChanged(); + return this; + } + + private java.util.List sampleGcsFileSpecs_ = + java.util.Collections.emptyList(); + + private void ensureSampleGcsFileSpecsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + sampleGcsFileSpecs_ = + new java.util.ArrayList( + sampleGcsFileSpecs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFileSpec, + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder> + sampleGcsFileSpecsBuilder_; + + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSampleGcsFileSpecsList() { + if (sampleGcsFileSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sampleGcsFileSpecs_); + } else { + return sampleGcsFileSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSampleGcsFileSpecsCount() { + if (sampleGcsFileSpecsBuilder_ == null) { + return sampleGcsFileSpecs_.size(); + } else { + return sampleGcsFileSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpec getSampleGcsFileSpecs(int index) { + if (sampleGcsFileSpecsBuilder_ == null) { + return sampleGcsFileSpecs_.get(index); + } else { + return sampleGcsFileSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSampleGcsFileSpecs( + int index, com.google.cloud.datacatalog.v1.GcsFileSpec value) { + if (sampleGcsFileSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.set(index, value); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSampleGcsFileSpecs( + int index, com.google.cloud.datacatalog.v1.GcsFileSpec.Builder builderForValue) { + if (sampleGcsFileSpecsBuilder_ == null) { + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSampleGcsFileSpecs(com.google.cloud.datacatalog.v1.GcsFileSpec value) { + if (sampleGcsFileSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.add(value); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSampleGcsFileSpecs( + int index, com.google.cloud.datacatalog.v1.GcsFileSpec value) { + if (sampleGcsFileSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.add(index, value); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSampleGcsFileSpecs( + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder builderForValue) { + if (sampleGcsFileSpecsBuilder_ == null) { + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.add(builderForValue.build()); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSampleGcsFileSpecs( + int index, com.google.cloud.datacatalog.v1.GcsFileSpec.Builder builderForValue) { + if (sampleGcsFileSpecsBuilder_ == null) { + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSampleGcsFileSpecs( + java.lang.Iterable values) { + if (sampleGcsFileSpecsBuilder_ == null) { + ensureSampleGcsFileSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sampleGcsFileSpecs_); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSampleGcsFileSpecs() { + if (sampleGcsFileSpecsBuilder_ == null) { + sampleGcsFileSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSampleGcsFileSpecs(int index) { + if (sampleGcsFileSpecsBuilder_ == null) { + ensureSampleGcsFileSpecsIsMutable(); + sampleGcsFileSpecs_.remove(index); + onChanged(); + } else { + sampleGcsFileSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpec.Builder getSampleGcsFileSpecsBuilder( + int index) { + return getSampleGcsFileSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder getSampleGcsFileSpecsOrBuilder( + int index) { + if (sampleGcsFileSpecsBuilder_ == null) { + return sampleGcsFileSpecs_.get(index); + } else { + return sampleGcsFileSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSampleGcsFileSpecsOrBuilderList() { + if (sampleGcsFileSpecsBuilder_ != null) { + return sampleGcsFileSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sampleGcsFileSpecs_); + } + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpec.Builder addSampleGcsFileSpecsBuilder() { + return getSampleGcsFileSpecsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.GcsFileSpec.Builder addSampleGcsFileSpecsBuilder( + int index) { + return getSampleGcsFileSpecsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.GcsFileSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample files contained in this fileset, not all files
+     * contained in this fileset are represented here.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSampleGcsFileSpecsBuilderList() { + return getSampleGcsFileSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFileSpec, + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder> + getSampleGcsFileSpecsFieldBuilder() { + if (sampleGcsFileSpecsBuilder_ == null) { + sampleGcsFileSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.GcsFileSpec, + com.google.cloud.datacatalog.v1.GcsFileSpec.Builder, + com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder>( + sampleGcsFileSpecs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + sampleGcsFileSpecs_ = null; + } + return sampleGcsFileSpecsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.GcsFilesetSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GcsFilesetSpec) + private static final com.google.cloud.datacatalog.v1.GcsFilesetSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GcsFilesetSpec(); + } + + public static com.google.cloud.datacatalog.v1.GcsFilesetSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsFilesetSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsFilesetSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GcsFilesetSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOrBuilder.java new file mode 100644 index 00000000..3decf7ef --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOrBuilder.java @@ -0,0 +1,227 @@ +/* + * 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/cloud/datacatalog/v1/gcs_fileset_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface GcsFilesetSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GcsFilesetSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the filePatterns. + */ + java.util.List getFilePatternsList(); + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of filePatterns. + */ + int getFilePatternsCount(); + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The filePatterns at the given index. + */ + java.lang.String getFilePatterns(int index); + /** + * + * + *
+   * Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud
+   * Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
+   * more information. Note that bucket wildcards are currently not supported.
+   * Examples of valid file_patterns:
+   *  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
+   *                              directory.
+   *  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
+   *                               spanning all subdirectories.
+   *  * `gs://bucket_name/file*`: matches files prefixed by `file` in
+   *                              `bucket_name`
+   *  * `gs://bucket_name/??.txt`: matches files with two characters followed by
+   *                               `.txt` in `bucket_name`
+   *  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
+   *                                    vowel character followed by `.txt` in
+   *                                    `bucket_name`
+   *  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
+   *                                  or `m` followed by `.txt` in `bucket_name`
+   *  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
+   *                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
+   *  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
+   * You can combine wildcards to provide more powerful matches, for example:
+   *  * `gs://bucket_name/[a-m]??.j*g`
+   * 
+ * + * repeated string file_patterns = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the filePatterns at the given index. + */ + com.google.protobuf.ByteString getFilePatternsBytes(int index); + + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSampleGcsFileSpecsList(); + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.GcsFileSpec getSampleGcsFileSpecs(int index); + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSampleGcsFileSpecsCount(); + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSampleGcsFileSpecsOrBuilderList(); + /** + * + * + *
+   * Output only. Sample files contained in this fileset, not all files
+   * contained in this fileset are represented here.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.GcsFileSpec sample_gcs_file_specs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.GcsFileSpecOrBuilder getSampleGcsFileSpecsOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOuterClass.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOuterClass.java new file mode 100644 index 00000000..4f4c89e3 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFilesetSpecOuterClass.java @@ -0,0 +1,95 @@ +/* + * 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/cloud/datacatalog/v1/gcs_fileset_spec.proto + +package com.google.cloud.datacatalog.v1; + +public final class GcsFilesetSpecOuterClass { + private GcsFilesetSpecOuterClass() {} + + 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_cloud_datacatalog_v1_GcsFilesetSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/datacatalog/v1/gcs_filese" + + "t_spec.proto\022\033google.cloud.datacatalog.v" + + "1\032\037google/api/field_behavior.proto\032,goog" + + "le/cloud/datacatalog/v1/timestamps.proto" + + "\"z\n\016GcsFilesetSpec\022\032\n\rfile_patterns\030\001 \003(" + + "\tB\003\340A\002\022L\n\025sample_gcs_file_specs\030\002 \003(\0132(." + + "google.cloud.datacatalog.v1.GcsFileSpecB" + + "\003\340A\003\"\212\001\n\013GcsFileSpec\022\026\n\tfile_path\030\001 \001(\tB" + + "\003\340A\002\022J\n\016gcs_timestamps\030\002 \001(\0132-.google.cl" + + "oud.datacatalog.v1.SystemTimestampsB\003\340A\003" + + "\022\027\n\nsize_bytes\030\004 \001(\003B\003\340A\003Bn\n\037com.google." + + "cloud.datacatalog.v1P\001ZFgoogle.golang.or" + + "g/genproto/googleapis/cloud/datacatalog/" + + "v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GcsFilesetSpec_descriptor, + new java.lang.String[] { + "FilePatterns", "SampleGcsFileSpecs", + }); + internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_GcsFileSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GcsFileSpec_descriptor, + new java.lang.String[] { + "FilePath", "GcsTimestamps", "SizeBytes", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequest.java new file mode 100644 index 00000000..8f73a8bb --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequest.java @@ -0,0 +1,922 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetEntryGroupRequest} + */ +public final class GetEntryGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GetEntryGroupRequest) + GetEntryGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEntryGroupRequest.newBuilder() to construct. + private GetEntryGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEntryGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEntryGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEntryGroupRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.GetEntryGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * 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) { + 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 entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * 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 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 READ_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (readMask_ != null) { + output.writeMessage(2, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.GetEntryGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GetEntryGroupRequest other = + (com.google.cloud.datacatalog.v1.GetEntryGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.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 (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GetEntryGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetEntryGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GetEntryGroupRequest) + com.google.cloud.datacatalog.v1.GetEntryGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.GetEntryGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GetEntryGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryGroupRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GetEntryGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryGroupRequest build() { + com.google.cloud.datacatalog.v1.GetEntryGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryGroupRequest buildPartial() { + com.google.cloud.datacatalog.v1.GetEntryGroupRequest result = + new com.google.cloud.datacatalog.v1.GetEntryGroupRequest(this); + result.name_ = name_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.cloud.datacatalog.v1.GetEntryGroupRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.GetEntryGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GetEntryGroupRequest other) { + if (other == com.google.cloud.datacatalog.v1.GetEntryGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.GetEntryGroupRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.GetEntryGroupRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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 entry group. For example,
+     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+     * 
+ * + * + * 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.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * The fields to return. If not set or empty, all fields are returned.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.GetEntryGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GetEntryGroupRequest) + private static final com.google.cloud.datacatalog.v1.GetEntryGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GetEntryGroupRequest(); + } + + public static com.google.cloud.datacatalog.v1.GetEntryGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntryGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEntryGroupRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequestOrBuilder.java new file mode 100644 index 00000000..84e38a5c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface GetEntryGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GetEntryGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entry group. For example,
+   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * The fields to return. If not set or empty, all fields are returned.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequest.java new file mode 100644 index 00000000..29302a43 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequest.java @@ -0,0 +1,656 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetEntryRequest} + */ +public final class GetEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GetEntryRequest) + GetEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEntryRequest.newBuilder() to construct. + private GetEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEntryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetEntryRequest.class, + com.google.cloud.datacatalog.v1.GetEntryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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) { + 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 entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.cloud.datacatalog.v1.GetEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GetEntryRequest other = + (com.google.cloud.datacatalog.v1.GetEntryRequest) 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.cloud.datacatalog.v1.GetEntryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GetEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GetEntryRequest) + com.google.cloud.datacatalog.v1.GetEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetEntryRequest.class, + com.google.cloud.datacatalog.v1.GetEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GetEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GetEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryRequest build() { + com.google.cloud.datacatalog.v1.GetEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryRequest buildPartial() { + com.google.cloud.datacatalog.v1.GetEntryRequest result = + new com.google.cloud.datacatalog.v1.GetEntryRequest(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.cloud.datacatalog.v1.GetEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.GetEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GetEntryRequest other) { + if (other == com.google.cloud.datacatalog.v1.GetEntryRequest.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.cloud.datacatalog.v1.GetEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.GetEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 entry. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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.cloud.datacatalog.v1.GetEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GetEntryRequest) + private static final com.google.cloud.datacatalog.v1.GetEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GetEntryRequest(); + } + + public static com.google.cloud.datacatalog.v1.GetEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequestOrBuilder.java new file mode 100644 index 00000000..9632b064 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequestOrBuilder.java @@ -0,0 +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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface GetEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GetEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entry. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequest.java new file mode 100644 index 00000000..b3c23234 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequest.java @@ -0,0 +1,658 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetTagTemplateRequest} + */ +public final class GetTagTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GetTagTemplateRequest) + GetTagTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTagTemplateRequest.newBuilder() to construct. + private GetTagTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTagTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTagTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTagTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.GetTagTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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) { + 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 tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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 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 (!getNameBytes().isEmpty()) { + 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 (!getNameBytes().isEmpty()) { + 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.cloud.datacatalog.v1.GetTagTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GetTagTemplateRequest other = + (com.google.cloud.datacatalog.v1.GetTagTemplateRequest) 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.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.GetTagTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GetTagTemplateRequest) + com.google.cloud.datacatalog.v1.GetTagTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.GetTagTemplateRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GetTagTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTagTemplateRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GetTagTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTagTemplateRequest build() { + com.google.cloud.datacatalog.v1.GetTagTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTagTemplateRequest buildPartial() { + com.google.cloud.datacatalog.v1.GetTagTemplateRequest result = + new com.google.cloud.datacatalog.v1.GetTagTemplateRequest(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.cloud.datacatalog.v1.GetTagTemplateRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.GetTagTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GetTagTemplateRequest other) { + if (other == com.google.cloud.datacatalog.v1.GetTagTemplateRequest.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.cloud.datacatalog.v1.GetTagTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.GetTagTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * 
+ * + * + * 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.cloud.datacatalog.v1.GetTagTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GetTagTemplateRequest) + private static final com.google.cloud.datacatalog.v1.GetTagTemplateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GetTagTemplateRequest(); + } + + public static com.google.cloud.datacatalog.v1.GetTagTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTagTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTagTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTagTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequestOrBuilder.java new file mode 100644 index 00000000..79860864 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequestOrBuilder.java @@ -0,0 +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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface GetTagTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GetTagTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * 
+ * + * + * 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/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java new file mode 100644 index 00000000..74da0043 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java @@ -0,0 +1,173 @@ +/* + * 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/cloud/datacatalog/v1/common.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * This enum describes all the possible systems that Data Catalog integrates
+ * with.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1.IntegratedSystem} + */ +public enum IntegratedSystem implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown system.
+   * 
+ * + * INTEGRATED_SYSTEM_UNSPECIFIED = 0; + */ + INTEGRATED_SYSTEM_UNSPECIFIED(0), + /** + * + * + *
+   * BigQuery.
+   * 
+ * + * BIGQUERY = 1; + */ + BIGQUERY(1), + /** + * + * + *
+   * Cloud Pub/Sub.
+   * 
+ * + * CLOUD_PUBSUB = 2; + */ + CLOUD_PUBSUB(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown system.
+   * 
+ * + * INTEGRATED_SYSTEM_UNSPECIFIED = 0; + */ + public static final int INTEGRATED_SYSTEM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * BigQuery.
+   * 
+ * + * BIGQUERY = 1; + */ + public static final int BIGQUERY_VALUE = 1; + /** + * + * + *
+   * Cloud Pub/Sub.
+   * 
+ * + * CLOUD_PUBSUB = 2; + */ + public static final int CLOUD_PUBSUB_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 IntegratedSystem 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 IntegratedSystem forNumber(int value) { + switch (value) { + case 0: + return INTEGRATED_SYSTEM_UNSPECIFIED; + case 1: + return BIGQUERY; + case 2: + return CLOUD_PUBSUB; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IntegratedSystem findValueByNumber(int number) { + return IntegratedSystem.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.cloud.datacatalog.v1.Common.getDescriptor().getEnumTypes().get(0); + } + + private static final IntegratedSystem[] VALUES = values(); + + public static IntegratedSystem 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 IntegratedSystem(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.IntegratedSystem) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequest.java new file mode 100644 index 00000000..07367b3c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequest.java @@ -0,0 +1,1241 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntriesRequest} + */ +public final class ListEntriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListEntriesRequest) + ListEntriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntriesRequest.newBuilder() to construct. + private ListEntriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntriesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntriesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntriesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntriesRequest.class, + com.google.cloud.datacatalog.v1.ListEntriesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the entry group that contains the entries, which can
+   * be provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * 
+ * + * + * 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) { + 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. The name of the entry group that contains the entries, which can
+   * be provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * 
+ * + * + * 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 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_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return. Default is 10. Max limit is 1000.
+   * Throws an invalid argument for `page_size > 1000`.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + 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; + } + } + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + 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 READ_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (readMask_ != null) { + output.writeMessage(4, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListEntriesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListEntriesRequest other = + (com.google.cloud.datacatalog.v1.ListEntriesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.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_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ListEntriesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListEntriesRequest) + com.google.cloud.datacatalog.v1.ListEntriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntriesRequest.class, + com.google.cloud.datacatalog.v1.ListEntriesRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListEntriesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListEntriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesRequest build() { + com.google.cloud.datacatalog.v1.ListEntriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesRequest buildPartial() { + com.google.cloud.datacatalog.v1.ListEntriesRequest result = + new com.google.cloud.datacatalog.v1.ListEntriesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.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.cloud.datacatalog.v1.ListEntriesRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListEntriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListEntriesRequest other) { + if (other == com.google.cloud.datacatalog.v1.ListEntriesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ListEntriesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListEntriesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the entry group that contains the entries, which can
+     * be provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * 
+ * + * + * 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. The name of the entry group that contains the entries, which can
+     * be provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * 
+ * + * + * 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. The name of the entry group that contains the entries, which can
+     * be provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * 
+ * + * + * 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. The name of the entry group that contains the entries, which can
+     * be provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * 
+ * + * + * 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. The name of the entry group that contains the entries, which can
+     * be provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * The maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * 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 maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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 com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * The fields to return for each Entry. If not set or empty, all
+     * fields are returned.
+     * For example, setting read_mask to contain only one path "name" will cause
+     * ListEntries to return a list of Entries with only "name" field.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListEntriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListEntriesRequest) + private static final com.google.cloud.datacatalog.v1.ListEntriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListEntriesRequest(); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntriesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequestOrBuilder.java new file mode 100644 index 00000000..81ec6d8e --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListEntriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListEntriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entry group that contains the entries, which can
+   * be provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the entry group that contains the entries, which can
+   * be provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return. Default is 10. Max limit is 1000.
+   * Throws an invalid argument for `page_size > 1000`.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * The fields to return for each Entry. If not set or empty, all
+   * fields are returned.
+   * For example, setting read_mask to contain only one path "name" will cause
+   * ListEntries to return a list of Entries with only "name" field.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 4; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponse.java new file mode 100644 index 00000000..623be8ae --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponse.java @@ -0,0 +1,1129 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Response message for
+ * [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntriesResponse} + */ +public final class ListEntriesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListEntriesResponse) + ListEntriesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntriesResponse.newBuilder() to construct. + private ListEntriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntriesResponse() { + entries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntriesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntriesResponse( + 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)) { + entries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entries_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.Entry.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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntriesResponse.class, + com.google.cloud.datacatalog.v1.ListEntriesResponse.Builder.class); + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + private java.util.List entries_; + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.Entry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + 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 < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.cloud.datacatalog.v1.ListEntriesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListEntriesResponse other = + (com.google.cloud.datacatalog.v1.ListEntriesResponse) obj; + + if (!getEntriesList().equals(other.getEntriesList())) 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 (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().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.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ListEntriesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntriesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListEntriesResponse) + com.google.cloud.datacatalog.v1.ListEntriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntriesResponse.class, + com.google.cloud.datacatalog.v1.ListEntriesResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListEntriesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListEntriesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesResponse build() { + com.google.cloud.datacatalog.v1.ListEntriesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesResponse buildPartial() { + com.google.cloud.datacatalog.v1.ListEntriesResponse result = + new com.google.cloud.datacatalog.v1.ListEntriesResponse(this); + int from_bitField0_ = bitField0_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.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.cloud.datacatalog.v1.ListEntriesResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListEntriesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListEntriesResponse other) { + if (other == com.google.cloud.datacatalog.v1.ListEntriesResponse.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + 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.cloud.datacatalog.v1.ListEntriesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListEntriesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.Entry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder setEntries(int index, com.google.cloud.datacatalog.v1.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.datacatalog.v1.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder addEntries(com.google.cloud.datacatalog.v1.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder addEntries(int index, com.google.cloud.datacatalog.v1.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder addEntries(com.google.cloud.datacatalog.v1.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.datacatalog.v1.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.Entry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.Entry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.Entry.getDefaultInstance()); + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public com.google.cloud.datacatalog.v1.Entry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.Entry.getDefaultInstance()); + } + /** + * + * + *
+     * Entry details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + public java.util.List getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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.cloud.datacatalog.v1.ListEntriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListEntriesResponse) + private static final com.google.cloud.datacatalog.v1.ListEntriesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListEntriesResponse(); + } + + public static com.google.cloud.datacatalog.v1.ListEntriesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntriesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntriesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponseOrBuilder.java new file mode 100644 index 00000000..bbb2b160 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListEntriesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListEntriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + com.google.cloud.datacatalog.v1.Entry getEntries(int index); + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Entry details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Entry entries = 1; + */ + com.google.cloud.datacatalog.v1.EntryOrBuilder getEntriesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java new file mode 100644 index 00000000..05b0e5a5 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java @@ -0,0 +1,941 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntryGroupsRequest} + */ +public final class ListEntryGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListEntryGroupsRequest) + ListEntryGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntryGroupsRequest.newBuilder() to construct. + private ListEntryGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntryGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntryGroupsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntryGroupsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.class, + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the location that contains the entry groups, which can be
+   * provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}
+   * 
+ * + * + * 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) { + 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. The name of the location that contains the entry groups, which can be
+   * provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}
+   * 
+ * + * + * 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 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_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+   * Throws an invalid argument for `page_size > 1000`.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + 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; + } + } + /** + * + * + *
+   * Optional. Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListEntryGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest other = + (com.google.cloud.datacatalog.v1.ListEntryGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.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_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntryGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListEntryGroupsRequest) + com.google.cloud.datacatalog.v1.ListEntryGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.class, + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsRequest build() { + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsRequest buildPartial() { + com.google.cloud.datacatalog.v1.ListEntryGroupsRequest result = + new com.google.cloud.datacatalog.v1.ListEntryGroupsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListEntryGroupsRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListEntryGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListEntryGroupsRequest other) { + if (other == com.google.cloud.datacatalog.v1.ListEntryGroupsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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.cloud.datacatalog.v1.ListEntryGroupsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListEntryGroupsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the location that contains the entry groups, which can be
+     * provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}
+     * 
+ * + * + * 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. The name of the location that contains the entry groups, which can be
+     * provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}
+     * 
+ * + * + * 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. The name of the location that contains the entry groups, which can be
+     * provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}
+     * 
+ * + * + * 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. The name of the location that contains the entry groups, which can be
+     * provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}
+     * 
+ * + * + * 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. The name of the location that contains the entry groups, which can be
+     * provided in URL format. Example:
+     * * projects/{project_id}/locations/{location}
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+     * Throws an invalid argument for `page_size > 1000`.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListEntryGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListEntryGroupsRequest) + private static final com.google.cloud.datacatalog.v1.ListEntryGroupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListEntryGroupsRequest(); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntryGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntryGroupsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java new file mode 100644 index 00000000..ec83aa42 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListEntryGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListEntryGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the location that contains the entry groups, which can be
+   * provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the location that contains the entry groups, which can be
+   * provided in URL format. Example:
+   * * projects/{project_id}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
+   * Throws an invalid argument for `page_size > 1000`.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponse.java new file mode 100644 index 00000000..0c722827 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponse.java @@ -0,0 +1,1134 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Response message for
+ * [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntryGroupsResponse} + */ +public final class ListEntryGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListEntryGroupsResponse) + ListEntryGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntryGroupsResponse.newBuilder() to construct. + private ListEntryGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntryGroupsResponse() { + entryGroups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntryGroupsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntryGroupsResponse( + 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)) { + entryGroups_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entryGroups_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.EntryGroup.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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entryGroups_ = java.util.Collections.unmodifiableList(entryGroups_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.class, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.Builder.class); + } + + public static final int ENTRY_GROUPS_FIELD_NUMBER = 1; + private java.util.List entryGroups_; + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public java.util.List getEntryGroupsList() { + return entryGroups_; + } + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public java.util.List + getEntryGroupsOrBuilderList() { + return entryGroups_; + } + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public int getEntryGroupsCount() { + return entryGroups_.size(); + } + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroups(int index) { + return entryGroups_.get(index); + } + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupsOrBuilder(int index) { + return entryGroups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + 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 < entryGroups_.size(); i++) { + output.writeMessage(1, entryGroups_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < entryGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entryGroups_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.cloud.datacatalog.v1.ListEntryGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse other = + (com.google.cloud.datacatalog.v1.ListEntryGroupsResponse) obj; + + if (!getEntryGroupsList().equals(other.getEntryGroupsList())) 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 (getEntryGroupsCount() > 0) { + hash = (37 * hash) + ENTRY_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getEntryGroupsList().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.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListEntryGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListEntryGroupsResponse) + com.google.cloud.datacatalog.v1.ListEntryGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.class, + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntryGroupsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entryGroupsBuilder_ == null) { + entryGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entryGroupsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListEntryGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse build() { + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse buildPartial() { + com.google.cloud.datacatalog.v1.ListEntryGroupsResponse result = + new com.google.cloud.datacatalog.v1.ListEntryGroupsResponse(this); + int from_bitField0_ = bitField0_; + if (entryGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entryGroups_ = java.util.Collections.unmodifiableList(entryGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entryGroups_ = entryGroups_; + } else { + result.entryGroups_ = entryGroupsBuilder_.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.cloud.datacatalog.v1.ListEntryGroupsResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListEntryGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListEntryGroupsResponse other) { + if (other == com.google.cloud.datacatalog.v1.ListEntryGroupsResponse.getDefaultInstance()) + return this; + if (entryGroupsBuilder_ == null) { + if (!other.entryGroups_.isEmpty()) { + if (entryGroups_.isEmpty()) { + entryGroups_ = other.entryGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntryGroupsIsMutable(); + entryGroups_.addAll(other.entryGroups_); + } + onChanged(); + } + } else { + if (!other.entryGroups_.isEmpty()) { + if (entryGroupsBuilder_.isEmpty()) { + entryGroupsBuilder_.dispose(); + entryGroupsBuilder_ = null; + entryGroups_ = other.entryGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + entryGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntryGroupsFieldBuilder() + : null; + } else { + entryGroupsBuilder_.addAllMessages(other.entryGroups_); + } + } + } + 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.cloud.datacatalog.v1.ListEntryGroupsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListEntryGroupsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List entryGroups_ = + java.util.Collections.emptyList(); + + private void ensureEntryGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entryGroups_ = + new java.util.ArrayList(entryGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + entryGroupsBuilder_; + + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public java.util.List getEntryGroupsList() { + if (entryGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entryGroups_); + } else { + return entryGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public int getEntryGroupsCount() { + if (entryGroupsBuilder_ == null) { + return entryGroups_.size(); + } else { + return entryGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroups(int index) { + if (entryGroupsBuilder_ == null) { + return entryGroups_.get(index); + } else { + return entryGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder setEntryGroups(int index, com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntryGroupsIsMutable(); + entryGroups_.set(index, value); + onChanged(); + } else { + entryGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder setEntryGroups( + int index, com.google.cloud.datacatalog.v1.EntryGroup.Builder builderForValue) { + if (entryGroupsBuilder_ == null) { + ensureEntryGroupsIsMutable(); + entryGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + entryGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder addEntryGroups(com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntryGroupsIsMutable(); + entryGroups_.add(value); + onChanged(); + } else { + entryGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder addEntryGroups(int index, com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntryGroupsIsMutable(); + entryGroups_.add(index, value); + onChanged(); + } else { + entryGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder addEntryGroups( + com.google.cloud.datacatalog.v1.EntryGroup.Builder builderForValue) { + if (entryGroupsBuilder_ == null) { + ensureEntryGroupsIsMutable(); + entryGroups_.add(builderForValue.build()); + onChanged(); + } else { + entryGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder addEntryGroups( + int index, com.google.cloud.datacatalog.v1.EntryGroup.Builder builderForValue) { + if (entryGroupsBuilder_ == null) { + ensureEntryGroupsIsMutable(); + entryGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + entryGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder addAllEntryGroups( + java.lang.Iterable values) { + if (entryGroupsBuilder_ == null) { + ensureEntryGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entryGroups_); + onChanged(); + } else { + entryGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder clearEntryGroups() { + if (entryGroupsBuilder_ == null) { + entryGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entryGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public Builder removeEntryGroups(int index) { + if (entryGroupsBuilder_ == null) { + ensureEntryGroupsIsMutable(); + entryGroups_.remove(index); + onChanged(); + } else { + entryGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroup.Builder getEntryGroupsBuilder(int index) { + return getEntryGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupsOrBuilder(int index) { + if (entryGroupsBuilder_ == null) { + return entryGroups_.get(index); + } else { + return entryGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public java.util.List + getEntryGroupsOrBuilderList() { + if (entryGroupsBuilder_ != null) { + return entryGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entryGroups_); + } + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroup.Builder addEntryGroupsBuilder() { + return getEntryGroupsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance()); + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public com.google.cloud.datacatalog.v1.EntryGroup.Builder addEntryGroupsBuilder(int index) { + return getEntryGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance()); + } + /** + * + * + *
+     * EntryGroup details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + public java.util.List + getEntryGroupsBuilderList() { + return getEntryGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + getEntryGroupsFieldBuilder() { + if (entryGroupsBuilder_ == null) { + entryGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder>( + entryGroups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entryGroups_ = null; + } + return entryGroupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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.cloud.datacatalog.v1.ListEntryGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListEntryGroupsResponse) + private static final com.google.cloud.datacatalog.v1.ListEntryGroupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListEntryGroupsResponse(); + } + + public static com.google.cloud.datacatalog.v1.ListEntryGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntryGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntryGroupsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponseOrBuilder.java new file mode 100644 index 00000000..af202930 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListEntryGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListEntryGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + java.util.List getEntryGroupsList(); + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + com.google.cloud.datacatalog.v1.EntryGroup getEntryGroups(int index); + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + int getEntryGroupsCount(); + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + java.util.List + getEntryGroupsOrBuilderList(); + /** + * + * + *
+   * EntryGroup details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.EntryGroup entry_groups = 1; + */ + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java new file mode 100644 index 00000000..a07a5d65 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java @@ -0,0 +1,956 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTagsRequest} + */ +public final class ListTagsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListTagsRequest) + ListTagsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTagsRequest.newBuilder() to construct. + private ListTagsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTagsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTagsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTagsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTagsRequest.class, + com.google.cloud.datacatalog.v1.ListTagsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the Data Catalog resource to list the tags of. The resource
+   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+   * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * Examples:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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) { + 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. The name of the Data Catalog resource to list the tags of. The resource
+   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+   * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * Examples:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * 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 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_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of tags to return. Default is 10. Max limit is 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + 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; + } + } + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListTagsRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListTagsRequest other = + (com.google.cloud.datacatalog.v1.ListTagsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.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_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ListTagsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTagsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListTagsRequest) + com.google.cloud.datacatalog.v1.ListTagsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTagsRequest.class, + com.google.cloud.datacatalog.v1.ListTagsRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListTagsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListTagsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsRequest build() { + com.google.cloud.datacatalog.v1.ListTagsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsRequest buildPartial() { + com.google.cloud.datacatalog.v1.ListTagsRequest result = + new com.google.cloud.datacatalog.v1.ListTagsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListTagsRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListTagsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListTagsRequest other) { + if (other == com.google.cloud.datacatalog.v1.ListTagsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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.cloud.datacatalog.v1.ListTagsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.ListTagsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the Data Catalog resource to list the tags of. The resource
+     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+     * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+     * Examples:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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. The name of the Data Catalog resource to list the tags of. The resource
+     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+     * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+     * Examples:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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. The name of the Data Catalog resource to list the tags of. The resource
+     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+     * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+     * Examples:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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. The name of the Data Catalog resource to list the tags of. The resource
+     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+     * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+     * Examples:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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. The name of the Data Catalog resource to list the tags of. The resource
+     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+     * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+     * Examples:
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * The maximum number of tags to return. Default is 10. Max limit is 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of tags to return. Default is 10. Max limit is 1000.
+     * 
+ * + * 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 maximum number of tags to return. Default is 10. Max limit is 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token that specifies which page is requested. If empty, the first page is
+     * returned.
+     * 
+ * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListTagsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListTagsRequest) + private static final com.google.cloud.datacatalog.v1.ListTagsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListTagsRequest(); + } + + public static com.google.cloud.datacatalog.v1.ListTagsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTagsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTagsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java new file mode 100644 index 00000000..34b2b83f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListTagsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListTagsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Data Catalog resource to list the tags of. The resource
+   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+   * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * Examples:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the Data Catalog resource to list the tags of. The resource
+   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
+   * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * Examples:
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
+   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of tags to return. Default is 10. Max limit is 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token that specifies which page is requested. If empty, the first page is
+   * returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponse.java new file mode 100644 index 00000000..b6ee14cc --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponse.java @@ -0,0 +1,1126 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Response message for
+ * [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTagsResponse} + */ +public final class ListTagsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListTagsResponse) + ListTagsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTagsResponse.newBuilder() to construct. + private ListTagsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTagsResponse() { + tags_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTagsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTagsResponse( + 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)) { + tags_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tags_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.Tag.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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = java.util.Collections.unmodifiableList(tags_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTagsResponse.class, + com.google.cloud.datacatalog.v1.ListTagsResponse.Builder.class); + } + + public static final int TAGS_FIELD_NUMBER = 1; + private java.util.List tags_; + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public java.util.List getTagsList() { + return tags_; + } + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public java.util.List + getTagsOrBuilderList() { + return tags_; + } + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.Tag getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagsOrBuilder(int index) { + return tags_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + 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 < tags_.size(); i++) { + output.writeMessage(1, tags_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < tags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tags_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.cloud.datacatalog.v1.ListTagsResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListTagsResponse other = + (com.google.cloud.datacatalog.v1.ListTagsResponse) obj; + + if (!getTagsList().equals(other.getTagsList())) 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 (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().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.cloud.datacatalog.v1.ListTagsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ListTagsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTagsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListTagsResponse) + com.google.cloud.datacatalog.v1.ListTagsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTagsResponse.class, + com.google.cloud.datacatalog.v1.ListTagsResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListTagsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tagsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListTagsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsResponse build() { + com.google.cloud.datacatalog.v1.ListTagsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsResponse buildPartial() { + com.google.cloud.datacatalog.v1.ListTagsResponse result = + new com.google.cloud.datacatalog.v1.ListTagsResponse(this); + int from_bitField0_ = bitField0_; + if (tagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = java.util.Collections.unmodifiableList(tags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + } else { + result.tags_ = tagsBuilder_.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.cloud.datacatalog.v1.ListTagsResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListTagsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListTagsResponse other) { + if (other == com.google.cloud.datacatalog.v1.ListTagsResponse.getDefaultInstance()) + return this; + if (tagsBuilder_ == null) { + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + } else { + if (!other.tags_.isEmpty()) { + if (tagsBuilder_.isEmpty()) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + tagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTagsFieldBuilder() + : null; + } else { + tagsBuilder_.addAllMessages(other.tags_); + } + } + } + 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.cloud.datacatalog.v1.ListTagsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.ListTagsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List tags_ = + java.util.Collections.emptyList(); + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new java.util.ArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + tagsBuilder_; + + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public java.util.List getTagsList() { + if (tagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tags_); + } else { + return tagsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public int getTagsCount() { + if (tagsBuilder_ == null) { + return tags_.size(); + } else { + return tagsBuilder_.getCount(); + } + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.Tag getTags(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder setTags(int index, com.google.cloud.datacatalog.v1.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + } else { + tagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder setTags(int index, com.google.cloud.datacatalog.v1.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.set(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder addTags(com.google.cloud.datacatalog.v1.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + } else { + tagsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder addTags(int index, com.google.cloud.datacatalog.v1.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(index, value); + onChanged(); + } else { + tagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder addTags(com.google.cloud.datacatalog.v1.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder addTags(int index, com.google.cloud.datacatalog.v1.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder addAllTags( + java.lang.Iterable values) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + } else { + tagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder clearTags() { + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tagsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public Builder removeTags(int index) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.remove(index); + onChanged(); + } else { + tagsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.Tag.Builder getTagsBuilder(int index) { + return getTagsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagsOrBuilder(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public java.util.List + getTagsOrBuilderList() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tags_); + } + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.Tag.Builder addTagsBuilder() { + return getTagsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.Tag.getDefaultInstance()); + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public com.google.cloud.datacatalog.v1.Tag.Builder addTagsBuilder(int index) { + return getTagsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.Tag.getDefaultInstance()); + } + /** + * + * + *
+     * [Tag][google.cloud.datacatalog.v1.Tag] details.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + public java.util.List getTagsBuilderList() { + return getTagsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + getTagsFieldBuilder() { + if (tagsBuilder_ == null) { + tagsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder>( + tags_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tags_ = null; + } + return tagsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no items
+     * remain in results.
+     * 
+ * + * 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.cloud.datacatalog.v1.ListTagsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListTagsResponse) + private static final com.google.cloud.datacatalog.v1.ListTagsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListTagsResponse(); + } + + public static com.google.cloud.datacatalog.v1.ListTagsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTagsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTagsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTagsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponseOrBuilder.java new file mode 100644 index 00000000..dec0370f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListTagsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListTagsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + java.util.List getTagsList(); + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + com.google.cloud.datacatalog.v1.Tag getTags(int index); + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + int getTagsCount(); + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + java.util.List getTagsOrBuilderList(); + /** + * + * + *
+   * [Tag][google.cloud.datacatalog.v1.Tag] details.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.Tag tags = 1; + */ + com.google.cloud.datacatalog.v1.TagOrBuilder getTagsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no items
+   * remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LocationName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LocationName.java new file mode 100644 index 00000000..d23e4eff --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LocationName.java @@ -0,0 +1,182 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + 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 = + PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + 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() {} + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java new file mode 100644 index 00000000..75d5bd1c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java @@ -0,0 +1,1041 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.LookupEntryRequest} + */ +public final class LookupEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.LookupEntryRequest) + LookupEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LookupEntryRequest.newBuilder() to construct. + private LookupEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LookupEntryRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LookupEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LookupEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + targetNameCase_ = 1; + targetName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + targetNameCase_ = 3; + targetName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.LookupEntryRequest.class, + com.google.cloud.datacatalog.v1.LookupEntryRequest.Builder.class); + } + + private int targetNameCase_ = 0; + private java.lang.Object targetName_; + + public enum TargetNameCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LINKED_RESOURCE(1), + SQL_RESOURCE(3), + TARGETNAME_NOT_SET(0); + private final int value; + + private TargetNameCase(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 TargetNameCase valueOf(int value) { + return forNumber(value); + } + + public static TargetNameCase forNumber(int value) { + switch (value) { + case 1: + return LINKED_RESOURCE; + case 3: + return SQL_RESOURCE; + case 0: + return TARGETNAME_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetNameCase getTargetNameCase() { + return TargetNameCase.forNumber(targetNameCase_); + } + + public static final int LINKED_RESOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Full names are case-sensitive.
+   * Examples:
+   *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+   * 
+ * + * string linked_resource = 1; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof java.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 (targetNameCase_ == 1) { + targetName_ = s; + } + return s; + } + } + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Full names are case-sensitive.
+   * Examples:
+   *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+   * 
+ * + * string linked_resource = 1; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 1) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SQL_RESOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   *   * `cloud_pubsub.project_id.topic_id`
+   *   * ``pubsub.project_id.`topic.id.with.dots` ``
+   *   * `bigquery.table.project_id.dataset_id.table_id`
+   *   * `bigquery.dataset.project_id.dataset_id`
+   *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+   * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+   * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+   * 
+ * + * string sql_resource = 3; + * + * @return The sqlResource. + */ + public java.lang.String getSqlResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof java.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 (targetNameCase_ == 3) { + targetName_ = s; + } + return s; + } + } + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   *   * `cloud_pubsub.project_id.topic_id`
+   *   * ``pubsub.project_id.`topic.id.with.dots` ``
+   *   * `bigquery.table.project_id.dataset_id.table_id`
+   *   * `bigquery.dataset.project_id.dataset_id`
+   *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+   * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+   * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+   * 
+ * + * string sql_resource = 3; + * + * @return The bytes for sqlResource. + */ + public com.google.protobuf.ByteString getSqlResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 3) { + targetName_ = 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 (targetNameCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetName_); + } + if (targetNameCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetNameCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetName_); + } + if (targetNameCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.LookupEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.LookupEntryRequest other = + (com.google.cloud.datacatalog.v1.LookupEntryRequest) obj; + + if (!getTargetNameCase().equals(other.getTargetNameCase())) return false; + switch (targetNameCase_) { + case 1: + if (!getLinkedResource().equals(other.getLinkedResource())) return false; + break; + case 3: + if (!getSqlResource().equals(other.getSqlResource())) 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 (targetNameCase_) { + case 1: + hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLinkedResource().hashCode(); + break; + case 3: + hash = (37 * hash) + SQL_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSqlResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.LookupEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.LookupEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.LookupEntryRequest) + com.google.cloud.datacatalog.v1.LookupEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.LookupEntryRequest.class, + com.google.cloud.datacatalog.v1.LookupEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.LookupEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + targetNameCase_ = 0; + targetName_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.LookupEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.LookupEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.LookupEntryRequest build() { + com.google.cloud.datacatalog.v1.LookupEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.LookupEntryRequest buildPartial() { + com.google.cloud.datacatalog.v1.LookupEntryRequest result = + new com.google.cloud.datacatalog.v1.LookupEntryRequest(this); + if (targetNameCase_ == 1) { + result.targetName_ = targetName_; + } + if (targetNameCase_ == 3) { + result.targetName_ = targetName_; + } + result.targetNameCase_ = targetNameCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.LookupEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.LookupEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.LookupEntryRequest other) { + if (other == com.google.cloud.datacatalog.v1.LookupEntryRequest.getDefaultInstance()) + return this; + switch (other.getTargetNameCase()) { + case LINKED_RESOURCE: + { + targetNameCase_ = 1; + targetName_ = other.targetName_; + onChanged(); + break; + } + case SQL_RESOURCE: + { + targetNameCase_ = 3; + targetName_ = other.targetName_; + onChanged(); + break; + } + case TARGETNAME_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.cloud.datacatalog.v1.LookupEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.LookupEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetNameCase_ = 0; + private java.lang.Object targetName_; + + public TargetNameCase getTargetNameCase() { + return TargetNameCase.forNumber(targetNameCase_); + } + + public Builder clearTargetName() { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Full names are case-sensitive.
+     * Examples:
+     *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+     * 
+ * + * string linked_resource = 1; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 1) { + targetName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Full names are case-sensitive.
+     * Examples:
+     *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+     * 
+ * + * string linked_resource = 1; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 1) { + ref = targetName_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 1) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Full names are case-sensitive.
+     * Examples:
+     *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+     * 
+ * + * string linked_resource = 1; + * + * @param value The linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNameCase_ = 1; + targetName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Full names are case-sensitive.
+     * Examples:
+     *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+     * 
+ * + * string linked_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearLinkedResource() { + if (targetNameCase_ == 1) { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The full name of the Google Cloud Platform resource the Data Catalog
+     * entry represents. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Full names are case-sensitive.
+     * Examples:
+     *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+     *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+     * 
+ * + * string linked_resource = 1; + * + * @param value The bytes for linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNameCase_ = 1; + targetName_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     *   * `cloud_pubsub.project_id.topic_id`
+     *   * ``pubsub.project_id.`topic.id.with.dots` ``
+     *   * `bigquery.table.project_id.dataset_id.table_id`
+     *   * `bigquery.dataset.project_id.dataset_id`
+     *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+     * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+     * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+     * 
+ * + * string sql_resource = 3; + * + * @return The sqlResource. + */ + public java.lang.String getSqlResource() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 3) { + targetName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     *   * `cloud_pubsub.project_id.topic_id`
+     *   * ``pubsub.project_id.`topic.id.with.dots` ``
+     *   * `bigquery.table.project_id.dataset_id.table_id`
+     *   * `bigquery.dataset.project_id.dataset_id`
+     *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+     * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+     * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+     * 
+ * + * string sql_resource = 3; + * + * @return The bytes for sqlResource. + */ + public com.google.protobuf.ByteString getSqlResourceBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 3) { + ref = targetName_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 3) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     *   * `cloud_pubsub.project_id.topic_id`
+     *   * ``pubsub.project_id.`topic.id.with.dots` ``
+     *   * `bigquery.table.project_id.dataset_id.table_id`
+     *   * `bigquery.dataset.project_id.dataset_id`
+     *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+     * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+     * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+     * 
+ * + * string sql_resource = 3; + * + * @param value The sqlResource to set. + * @return This builder for chaining. + */ + public Builder setSqlResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNameCase_ = 3; + targetName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     *   * `cloud_pubsub.project_id.topic_id`
+     *   * ``pubsub.project_id.`topic.id.with.dots` ``
+     *   * `bigquery.table.project_id.dataset_id.table_id`
+     *   * `bigquery.dataset.project_id.dataset_id`
+     *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+     * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+     * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+     * 
+ * + * string sql_resource = 3; + * + * @return This builder for chaining. + */ + public Builder clearSqlResource() { + if (targetNameCase_ == 3) { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The SQL name of the entry. SQL names are case-sensitive.
+     * Examples:
+     *   * `cloud_pubsub.project_id.topic_id`
+     *   * ``pubsub.project_id.`topic.id.with.dots` ``
+     *   * `bigquery.table.project_id.dataset_id.table_id`
+     *   * `bigquery.dataset.project_id.dataset_id`
+     *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+     * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+     * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+     * 
+ * + * string sql_resource = 3; + * + * @param value The bytes for sqlResource to set. + * @return This builder for chaining. + */ + public Builder setSqlResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNameCase_ = 3; + targetName_ = 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.cloud.datacatalog.v1.LookupEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.LookupEntryRequest) + private static final com.google.cloud.datacatalog.v1.LookupEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.LookupEntryRequest(); + } + + public static com.google.cloud.datacatalog.v1.LookupEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LookupEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.LookupEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java new file mode 100644 index 00000000..26780218 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface LookupEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.LookupEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Full names are case-sensitive.
+   * Examples:
+   *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+   * 
+ * + * string linked_resource = 1; + * + * @return The linkedResource. + */ + java.lang.String getLinkedResource(); + /** + * + * + *
+   * The full name of the Google Cloud Platform resource the Data Catalog
+   * entry represents. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Full names are case-sensitive.
+   * Examples:
+   *  * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
+   *  * //pubsub.googleapis.com/projects/projectId/topics/topicId
+   * 
+ * + * string linked_resource = 1; + * + * @return The bytes for linkedResource. + */ + com.google.protobuf.ByteString getLinkedResourceBytes(); + + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   *   * `cloud_pubsub.project_id.topic_id`
+   *   * ``pubsub.project_id.`topic.id.with.dots` ``
+   *   * `bigquery.table.project_id.dataset_id.table_id`
+   *   * `bigquery.dataset.project_id.dataset_id`
+   *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+   * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+   * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+   * 
+ * + * string sql_resource = 3; + * + * @return The sqlResource. + */ + java.lang.String getSqlResource(); + /** + * + * + *
+   * The SQL name of the entry. SQL names are case-sensitive.
+   * Examples:
+   *   * `cloud_pubsub.project_id.topic_id`
+   *   * ``pubsub.project_id.`topic.id.with.dots` ``
+   *   * `bigquery.table.project_id.dataset_id.table_id`
+   *   * `bigquery.dataset.project_id.dataset_id`
+   *   * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
+   * `*_id`s shoud satisfy the standard SQL rules for identifiers.
+   * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
+   * 
+ * + * string sql_resource = 3; + * + * @return The bytes for sqlResource. + */ + com.google.protobuf.ByteString getSqlResourceBytes(); + + public com.google.cloud.datacatalog.v1.LookupEntryRequest.TargetNameCase getTargetNameCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java new file mode 100644 index 00000000..a4b4a090 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java @@ -0,0 +1,839 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} + */ +public final class RenameTagTemplateFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + RenameTagTemplateFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RenameTagTemplateFieldRequest.newBuilder() to construct. + private RenameTagTemplateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RenameTagTemplateFieldRequest() { + name_ = ""; + newTagTemplateFieldId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RenameTagTemplateFieldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RenameTagTemplateFieldRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + newTagTemplateFieldId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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) { + 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 tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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 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 NEW_TAG_TEMPLATE_FIELD_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object newTagTemplateFieldId_; + /** + * + * + *
+   * Required. The new ID of this tag template field. For example, `my_new_field`.
+   * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newTagTemplateFieldId. + */ + public java.lang.String getNewTagTemplateFieldId() { + java.lang.Object ref = newTagTemplateFieldId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newTagTemplateFieldId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The new ID of this tag template field. For example, `my_new_field`.
+   * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for newTagTemplateFieldId. + */ + public com.google.protobuf.ByteString getNewTagTemplateFieldIdBytes() { + java.lang.Object ref = newTagTemplateFieldId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newTagTemplateFieldId_ = 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getNewTagTemplateFieldIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newTagTemplateFieldId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getNewTagTemplateFieldIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newTagTemplateFieldId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest other = + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getNewTagTemplateFieldId().equals(other.getNewTagTemplateFieldId())) return false; + if (!unknownFields.equals(other.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) + NEW_TAG_TEMPLATE_FIELD_ID_FIELD_NUMBER; + hash = (53 * hash) + getNewTagTemplateFieldId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + newTagTemplateFieldId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest build() { + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest buildPartial() { + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest result = + new com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest(this); + result.name_ = name_; + result.newTagTemplateFieldId_ = newTagTemplateFieldId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest other) { + if (other + == com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getNewTagTemplateFieldId().isEmpty()) { + newTagTemplateFieldId_ = other.newTagTemplateFieldId_; + 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.cloud.datacatalog.v1.RenameTagTemplateFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 java.lang.Object newTagTemplateFieldId_ = ""; + /** + * + * + *
+     * Required. The new ID of this tag template field. For example, `my_new_field`.
+     * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newTagTemplateFieldId. + */ + public java.lang.String getNewTagTemplateFieldId() { + java.lang.Object ref = newTagTemplateFieldId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newTagTemplateFieldId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The new ID of this tag template field. For example, `my_new_field`.
+     * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for newTagTemplateFieldId. + */ + public com.google.protobuf.ByteString getNewTagTemplateFieldIdBytes() { + java.lang.Object ref = newTagTemplateFieldId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newTagTemplateFieldId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The new ID of this tag template field. For example, `my_new_field`.
+     * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The newTagTemplateFieldId to set. + * @return This builder for chaining. + */ + public Builder setNewTagTemplateFieldId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + newTagTemplateFieldId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The new ID of this tag template field. For example, `my_new_field`.
+     * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNewTagTemplateFieldId() { + + newTagTemplateFieldId_ = getDefaultInstance().getNewTagTemplateFieldId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The new ID of this tag template field. For example, `my_new_field`.
+     * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for newTagTemplateFieldId to set. + * @return This builder for chaining. + */ + public Builder setNewTagTemplateFieldIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + newTagTemplateFieldId_ = 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.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + private static final com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest(); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RenameTagTemplateFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RenameTagTemplateFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java new file mode 100644 index 00000000..ff360676 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface RenameTagTemplateFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag template. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The new ID of this tag template field. For example, `my_new_field`.
+   * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newTagTemplateFieldId. + */ + java.lang.String getNewTagTemplateFieldId(); + /** + * + * + *
+   * Required. The new ID of this tag template field. For example, `my_new_field`.
+   * 
+ * + * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for newTagTemplateFieldId. + */ + com.google.protobuf.ByteString getNewTagTemplateFieldIdBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java new file mode 100644 index 00000000..ad8a319c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java @@ -0,0 +1,1011 @@ +/* + * 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/cloud/datacatalog/v1/schema.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema).
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Schema} + */ +public final class Schema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.Schema) + SchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schema() { + columns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Schema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Schema( + 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)) { + columns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + columns_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.ColumnSchema.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Schema.class, + com.google.cloud.datacatalog.v1.Schema.Builder.class); + } + + public static final int COLUMNS_FIELD_NUMBER = 2; + private java.util.List columns_; + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getColumnsList() { + return columns_; + } + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getColumnsOrBuilderList() { + return columns_; + } + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getColumnsCount() { + return columns_.size(); + } + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { + return columns_.get(index); + } + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { + return columns_.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 < columns_.size(); i++) { + output.writeMessage(2, columns_.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 < columns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, columns_.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.cloud.datacatalog.v1.Schema)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.Schema other = (com.google.cloud.datacatalog.v1.Schema) obj; + + if (!getColumnsList().equals(other.getColumnsList())) return false; + if (!unknownFields.equals(other.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 (getColumnsCount() > 0) { + hash = (37 * hash) + COLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getColumnsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Schema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Schema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.Schema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 schema (e.g. BigQuery, GoogleSQL, Avro schema).
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Schema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.Schema) + com.google.cloud.datacatalog.v1.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Schema.class, + com.google.cloud.datacatalog.v1.Schema.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.Schema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getColumnsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + columnsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.SchemaOuterClass + .internal_static_google_cloud_datacatalog_v1_Schema_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Schema getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.Schema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Schema build() { + com.google.cloud.datacatalog.v1.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Schema buildPartial() { + com.google.cloud.datacatalog.v1.Schema result = + new com.google.cloud.datacatalog.v1.Schema(this); + int from_bitField0_ = bitField0_; + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.columns_ = columns_; + } else { + result.columns_ = columnsBuilder_.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.cloud.datacatalog.v1.Schema) { + return mergeFrom((com.google.cloud.datacatalog.v1.Schema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.Schema other) { + if (other == com.google.cloud.datacatalog.v1.Schema.getDefaultInstance()) return this; + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); + } + onChanged(); + } + } else { + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000001); + columnsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnsFieldBuilder() + : null; + } else { + columnsBuilder_.addAllMessages(other.columns_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.Schema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.Schema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List columns_ = + java.util.Collections.emptyList(); + + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + columns_ = new java.util.ArrayList(columns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder> + columnsBuilder_; + + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); + } else { + return columnsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); + } else { + return columnsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.set(index, value); + onChanged(); + } else { + columnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setColumns( + int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addColumns(com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(value); + onChanged(); + } else { + columnsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { + if (columnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsIsMutable(); + columns_.add(index, value); + onChanged(); + } else { + columnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addColumns( + com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addColumns( + int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); + onChanged(); + } else { + columnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllColumns( + java.lang.Iterable values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columns_); + onChanged(); + } else { + columnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + columnsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); + onChanged(); + } else { + columnsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder getColumnsBuilder(int index) { + return getColumnsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); + } else { + return columnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columns_); + } + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder() { + return getColumnsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder(int index) { + return getColumnsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.ColumnSchema.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+     * specified.
+     * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getColumnsBuilderList() { + return getColumnsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder> + getColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.ColumnSchema, + com.google.cloud.datacatalog.v1.ColumnSchema.Builder, + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder>( + columns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + columns_ = null; + } + return columnsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.Schema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.Schema) + private static final com.google.cloud.datacatalog.v1.Schema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.Schema(); + } + + public static com.google.cloud.datacatalog.v1.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Schema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java new file mode 100644 index 00000000..5f177d38 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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/cloud/datacatalog/v1/schema.proto + +package com.google.cloud.datacatalog.v1; + +public interface SchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getColumnsList(); + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index); + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getColumnsCount(); + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getColumnsOrBuilderList(); + /** + * + * + *
+   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
+   * specified.
+   * 
+ * + * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java new file mode 100644 index 00000000..9f15c0d3 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java @@ -0,0 +1,91 @@ +/* + * 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/cloud/datacatalog/v1/schema.proto + +package com.google.cloud.datacatalog.v1; + +public final class SchemaOuterClass { + private SchemaOuterClass() {} + + 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_cloud_datacatalog_v1_Schema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ColumnSchema_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/cloud/datacatalog/v1/schema.pro" + + "to\022\033google.cloud.datacatalog.v1\032\037google/" + + "api/field_behavior.proto\"I\n\006Schema\022?\n\007co" + + "lumns\030\002 \003(\0132).google.cloud.datacatalog.v" + + "1.ColumnSchemaB\003\340A\002\"\247\001\n\014ColumnSchema\022\023\n\006" + + "column\030\006 \001(\tB\003\340A\002\022\021\n\004type\030\001 \001(\tB\003\340A\002\022\030\n\013" + + "description\030\002 \001(\tB\003\340A\001\022\021\n\004mode\030\003 \001(\tB\003\340A" + + "\001\022B\n\nsubcolumns\030\007 \003(\0132).google.cloud.dat" + + "acatalog.v1.ColumnSchemaB\003\340A\001Bn\n\037com.goo" + + "gle.cloud.datacatalog.v1P\001ZFgoogle.golan" + + "g.org/genproto/googleapis/cloud/datacata" + + "log/v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_Schema_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_Schema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_Schema_descriptor, + new java.lang.String[] { + "Columns", + }); + internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_ColumnSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ColumnSchema_descriptor, + new java.lang.String[] { + "Column", "Type", "Description", "Mode", "Subcolumns", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java new file mode 100644 index 00000000..2283d624 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java @@ -0,0 +1,95 @@ +/* + * 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/cloud/datacatalog/v1/search.proto + +package com.google.cloud.datacatalog.v1; + +public final class Search { + private Search() {} + + 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_cloud_datacatalog_v1_SearchCatalogResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_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/cloud/datacatalog/v1/search.pro" + + "to\022\033google.cloud.datacatalog.v1\032\037google/" + + "api/field_behavior.proto\032(google/cloud/d" + + "atacatalog/v1/common.proto\032\037google/proto" + + "buf/timestamp.proto\"\264\002\n\023SearchCatalogRes" + + "ult\022I\n\022search_result_type\030\001 \001(\0162-.google" + + ".cloud.datacatalog.v1.SearchResultType\022\035" + + "\n\025search_result_subtype\030\002 \001(\t\022\036\n\026relativ" + + "e_resource_name\030\003 \001(\t\022\027\n\017linked_resource" + + "\030\004 \001(\t\022O\n\021integrated_system\030\010 \001(\0162-.goog" + + "le.cloud.datacatalog.v1.IntegratedSystem" + + "B\003\340A\003H\000\022\037\n\025user_specified_system\030\t \001(\tH\000" + + "B\010\n\006system*d\n\020SearchResultType\022\"\n\036SEARCH" + + "_RESULT_TYPE_UNSPECIFIED\020\000\022\t\n\005ENTRY\020\001\022\020\n" + + "\014TAG_TEMPLATE\020\002\022\017\n\013ENTRY_GROUP\020\003Bn\n\037com." + + "google.cloud.datacatalog.v1P\001ZFgoogle.go" + + "lang.org/genproto/googleapis/cloud/datac" + + "atalog/v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.datacatalog.v1.Common.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_descriptor, + new java.lang.String[] { + "SearchResultType", + "SearchResultSubtype", + "RelativeResourceName", + "LinkedResource", + "IntegratedSystem", + "UserSpecifiedSystem", + "System", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.datacatalog.v1.Common.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java new file mode 100644 index 00000000..738c7a78 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java @@ -0,0 +1,2831 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogRequest} + */ +public final class SearchCatalogRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SearchCatalogRequest) + SearchCatalogRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchCatalogRequest.newBuilder() to construct. + private SearchCatalogRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchCatalogRequest() { + query_ = ""; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchCatalogRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchCatalogRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + query_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 50: + { + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder subBuilder = null; + if (scope_ != null) { + subBuilder = scope_.toBuilder(); + } + scope_ = + input.readMessage( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scope_); + scope_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.class, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Builder.class); + } + + public interface ScopeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @return A list containing the includeOrgIds. + */ + java.util.List getIncludeOrgIdsList(); + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @return The count of includeOrgIds. + */ + int getIncludeOrgIdsCount(); + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the element to return. + * @return The includeOrgIds at the given index. + */ + java.lang.String getIncludeOrgIds(int index); + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the includeOrgIds at the given index. + */ + com.google.protobuf.ByteString getIncludeOrgIdsBytes(int index); + + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @return A list containing the includeProjectIds. + */ + java.util.List getIncludeProjectIdsList(); + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @return The count of includeProjectIds. + */ + int getIncludeProjectIdsCount(); + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the element to return. + * @return The includeProjectIds at the given index. + */ + java.lang.String getIncludeProjectIds(int index); + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includeProjectIds at the given index. + */ + com.google.protobuf.ByteString getIncludeProjectIdsBytes(int index); + + /** + * + * + *
+     * If `true`, include Google Cloud Platform (GCP) public datasets in the
+     * search results. Info on GCP public datasets is available at
+     * https://cloud.google.com/public-datasets/. By default, GCP public
+     * datasets are excluded.
+     * 
+ * + * bool include_gcp_public_datasets = 7; + * + * @return The includeGcpPublicDatasets. + */ + boolean getIncludeGcpPublicDatasets(); + } + /** + * + * + *
+   * The criteria that select the subspace used for query matching.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} + */ + public static final class Scope extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) + ScopeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Scope.newBuilder() to construct. + private Scope(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Scope() { + includeOrgIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + includeProjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Scope(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Scope( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + includeOrgIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + includeOrgIds_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + includeProjectIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + includeProjectIds_.add(s); + break; + } + case 56: + { + includeGcpPublicDatasets_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + includeOrgIds_ = includeOrgIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + includeProjectIds_ = includeProjectIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.class, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder.class); + } + + public static final int INCLUDE_ORG_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList includeOrgIds_; + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @return A list containing the includeOrgIds. + */ + public com.google.protobuf.ProtocolStringList getIncludeOrgIdsList() { + return includeOrgIds_; + } + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @return The count of includeOrgIds. + */ + public int getIncludeOrgIdsCount() { + return includeOrgIds_.size(); + } + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the element to return. + * @return The includeOrgIds at the given index. + */ + public java.lang.String getIncludeOrgIds(int index) { + return includeOrgIds_.get(index); + } + /** + * + * + *
+     * The list of organization IDs to search within. To find your organization
+     * ID, follow instructions in
+     * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+     * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the includeOrgIds at the given index. + */ + public com.google.protobuf.ByteString getIncludeOrgIdsBytes(int index) { + return includeOrgIds_.getByteString(index); + } + + public static final int INCLUDE_PROJECT_IDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList includeProjectIds_; + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @return A list containing the includeProjectIds. + */ + public com.google.protobuf.ProtocolStringList getIncludeProjectIdsList() { + return includeProjectIds_; + } + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @return The count of includeProjectIds. + */ + public int getIncludeProjectIdsCount() { + return includeProjectIds_.size(); + } + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the element to return. + * @return The includeProjectIds at the given index. + */ + public java.lang.String getIncludeProjectIds(int index) { + return includeProjectIds_.get(index); + } + /** + * + * + *
+     * The list of project IDs to search within. To learn more about the
+     * distinction between project names/IDs/numbers, go to
+     * https://cloud.google.com/docs/overview/#projects.
+     * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includeProjectIds at the given index. + */ + public com.google.protobuf.ByteString getIncludeProjectIdsBytes(int index) { + return includeProjectIds_.getByteString(index); + } + + public static final int INCLUDE_GCP_PUBLIC_DATASETS_FIELD_NUMBER = 7; + private boolean includeGcpPublicDatasets_; + /** + * + * + *
+     * If `true`, include Google Cloud Platform (GCP) public datasets in the
+     * search results. Info on GCP public datasets is available at
+     * https://cloud.google.com/public-datasets/. By default, GCP public
+     * datasets are excluded.
+     * 
+ * + * bool include_gcp_public_datasets = 7; + * + * @return The includeGcpPublicDatasets. + */ + public boolean getIncludeGcpPublicDatasets() { + return includeGcpPublicDatasets_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < includeOrgIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, includeOrgIds_.getRaw(i)); + } + for (int i = 0; i < includeProjectIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, includeProjectIds_.getRaw(i)); + } + if (includeGcpPublicDatasets_ != false) { + output.writeBool(7, includeGcpPublicDatasets_); + } + 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 < includeOrgIds_.size(); i++) { + dataSize += computeStringSizeNoTag(includeOrgIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeOrgIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < includeProjectIds_.size(); i++) { + dataSize += computeStringSizeNoTag(includeProjectIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeProjectIdsList().size(); + } + if (includeGcpPublicDatasets_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, includeGcpPublicDatasets_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope other = + (com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) obj; + + if (!getIncludeOrgIdsList().equals(other.getIncludeOrgIdsList())) return false; + if (!getIncludeProjectIdsList().equals(other.getIncludeProjectIdsList())) return false; + if (getIncludeGcpPublicDatasets() != other.getIncludeGcpPublicDatasets()) return false; + if (!unknownFields.equals(other.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 (getIncludeOrgIdsCount() > 0) { + hash = (37 * hash) + INCLUDE_ORG_IDS_FIELD_NUMBER; + hash = (53 * hash) + getIncludeOrgIdsList().hashCode(); + } + if (getIncludeProjectIdsCount() > 0) { + hash = (37 * hash) + INCLUDE_PROJECT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getIncludeProjectIdsList().hashCode(); + } + hash = (37 * hash) + INCLUDE_GCP_PUBLIC_DATASETS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeGcpPublicDatasets()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 criteria that select the subspace used for query matching.
+     * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) + com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.class, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + includeOrgIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + includeProjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + includeGcpPublicDatasets_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_Scope_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope build() { + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope buildPartial() { + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope result = + new com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + includeOrgIds_ = includeOrgIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.includeOrgIds_ = includeOrgIds_; + if (((bitField0_ & 0x00000002) != 0)) { + includeProjectIds_ = includeProjectIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.includeProjectIds_ = includeProjectIds_; + result.includeGcpPublicDatasets_ = includeGcpPublicDatasets_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) { + return mergeFrom((com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope other) { + if (other + == com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.getDefaultInstance()) + return this; + if (!other.includeOrgIds_.isEmpty()) { + if (includeOrgIds_.isEmpty()) { + includeOrgIds_ = other.includeOrgIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIncludeOrgIdsIsMutable(); + includeOrgIds_.addAll(other.includeOrgIds_); + } + onChanged(); + } + if (!other.includeProjectIds_.isEmpty()) { + if (includeProjectIds_.isEmpty()) { + includeProjectIds_ = other.includeProjectIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIncludeProjectIdsIsMutable(); + includeProjectIds_.addAll(other.includeProjectIds_); + } + onChanged(); + } + if (other.getIncludeGcpPublicDatasets() != false) { + setIncludeGcpPublicDatasets(other.getIncludeGcpPublicDatasets()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList includeOrgIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIncludeOrgIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + includeOrgIds_ = new com.google.protobuf.LazyStringArrayList(includeOrgIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @return A list containing the includeOrgIds. + */ + public com.google.protobuf.ProtocolStringList getIncludeOrgIdsList() { + return includeOrgIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @return The count of includeOrgIds. + */ + public int getIncludeOrgIdsCount() { + return includeOrgIds_.size(); + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the element to return. + * @return The includeOrgIds at the given index. + */ + public java.lang.String getIncludeOrgIds(int index) { + return includeOrgIds_.get(index); + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the includeOrgIds at the given index. + */ + public com.google.protobuf.ByteString getIncludeOrgIdsBytes(int index) { + return includeOrgIds_.getByteString(index); + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param index The index to set the value at. + * @param value The includeOrgIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeOrgIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeOrgIdsIsMutable(); + includeOrgIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param value The includeOrgIds to add. + * @return This builder for chaining. + */ + public Builder addIncludeOrgIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeOrgIdsIsMutable(); + includeOrgIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param values The includeOrgIds to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeOrgIds(java.lang.Iterable values) { + ensureIncludeOrgIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeOrgIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearIncludeOrgIds() { + includeOrgIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of organization IDs to search within. To find your organization
+       * ID, follow instructions in
+       * https://cloud.google.com/resource-manager/docs/creating-managing-organization.
+       * 
+ * + * repeated string include_org_ids = 2; + * + * @param value The bytes of the includeOrgIds to add. + * @return This builder for chaining. + */ + public Builder addIncludeOrgIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeOrgIdsIsMutable(); + includeOrgIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList includeProjectIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIncludeProjectIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + includeProjectIds_ = new com.google.protobuf.LazyStringArrayList(includeProjectIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @return A list containing the includeProjectIds. + */ + public com.google.protobuf.ProtocolStringList getIncludeProjectIdsList() { + return includeProjectIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @return The count of includeProjectIds. + */ + public int getIncludeProjectIdsCount() { + return includeProjectIds_.size(); + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the element to return. + * @return The includeProjectIds at the given index. + */ + public java.lang.String getIncludeProjectIds(int index) { + return includeProjectIds_.get(index); + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includeProjectIds at the given index. + */ + public com.google.protobuf.ByteString getIncludeProjectIdsBytes(int index) { + return includeProjectIds_.getByteString(index); + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param index The index to set the value at. + * @param value The includeProjectIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeProjectIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeProjectIdsIsMutable(); + includeProjectIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param value The includeProjectIds to add. + * @return This builder for chaining. + */ + public Builder addIncludeProjectIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeProjectIdsIsMutable(); + includeProjectIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param values The includeProjectIds to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeProjectIds(java.lang.Iterable values) { + ensureIncludeProjectIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeProjectIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @return This builder for chaining. + */ + public Builder clearIncludeProjectIds() { + includeProjectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of project IDs to search within. To learn more about the
+       * distinction between project names/IDs/numbers, go to
+       * https://cloud.google.com/docs/overview/#projects.
+       * 
+ * + * repeated string include_project_ids = 3; + * + * @param value The bytes of the includeProjectIds to add. + * @return This builder for chaining. + */ + public Builder addIncludeProjectIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeProjectIdsIsMutable(); + includeProjectIds_.add(value); + onChanged(); + return this; + } + + private boolean includeGcpPublicDatasets_; + /** + * + * + *
+       * If `true`, include Google Cloud Platform (GCP) public datasets in the
+       * search results. Info on GCP public datasets is available at
+       * https://cloud.google.com/public-datasets/. By default, GCP public
+       * datasets are excluded.
+       * 
+ * + * bool include_gcp_public_datasets = 7; + * + * @return The includeGcpPublicDatasets. + */ + public boolean getIncludeGcpPublicDatasets() { + return includeGcpPublicDatasets_; + } + /** + * + * + *
+       * If `true`, include Google Cloud Platform (GCP) public datasets in the
+       * search results. Info on GCP public datasets is available at
+       * https://cloud.google.com/public-datasets/. By default, GCP public
+       * datasets are excluded.
+       * 
+ * + * bool include_gcp_public_datasets = 7; + * + * @param value The includeGcpPublicDatasets to set. + * @return This builder for chaining. + */ + public Builder setIncludeGcpPublicDatasets(boolean value) { + + includeGcpPublicDatasets_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If `true`, include Google Cloud Platform (GCP) public datasets in the
+       * search results. Info on GCP public datasets is available at
+       * https://cloud.google.com/public-datasets/. By default, GCP public
+       * datasets are excluded.
+       * 
+ * + * bool include_gcp_public_datasets = 7; + * + * @return This builder for chaining. + */ + public Builder clearIncludeGcpPublicDatasets() { + + includeGcpPublicDatasets_ = 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.cloud.datacatalog.v1.SearchCatalogRequest.Scope) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) + private static final com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope(); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Scope(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SCOPE_FIELD_NUMBER = 6; + private com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope_; + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + public boolean hasScope() { + return scope_ != null; + } + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope getScope() { + return scope_ == null + ? com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.getDefaultInstance() + : scope_; + } + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getScopeOrBuilder() { + return getScope(); + } + + public static final int QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object query_; + /** + * + * + *
+   * Required. The query string in search query syntax. The query must be non-empty.
+   * Query strings can be simple as "x" or more qualified as:
+   * * name:x
+   * * column:x
+   * * description:y
+   * Note: Query tokens need to have a minimum of 3 characters for substring
+   * matching to work correctly. See [Data Catalog Search
+   * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+   * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The query string in search query syntax. The query must be non-empty.
+   * Query strings can be simple as "x" or more qualified as:
+   * * name:x
+   * * column:x
+   * * description:y
+   * Note: Query tokens need to have a minimum of 3 characters for substring
+   * matching to work correctly. See [Data Catalog Search
+   * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+   * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Number of results in the search page. If <=0 then defaults to 10. Max limit
+   * for page_size is 1000. Throws an invalid argument for page_size > 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. Pagination token returned in an earlier
+   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+   * indicates that this is a continuation of a prior
+   * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+   * call, and that the system should return the next page of data. If empty,
+   * the first page is returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + 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; + } + } + /** + * + * + *
+   * Optional. Pagination token returned in an earlier
+   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+   * indicates that this is a continuation of a prior
+   * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+   * call, and that the system should return the next page of data. If empty,
+   * the first page is returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + 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 ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Specifies the ordering of results, currently supported case-sensitive
+   * choices are:
+   *   * `relevance`, only supports descending
+   *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+   *     specified
+   * If not specified, defaults to `relevance` descending.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + 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; + } + } + /** + * + * + *
+   * Specifies the ordering of results, currently supported case-sensitive
+   * choices are:
+   *   * `relevance`, only supports descending
+   *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+   *     specified
+   * If not specified, defaults to `relevance` descending.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + if (scope_ != null) { + output.writeMessage(6, getScope()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + if (scope_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getScope()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SearchCatalogRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SearchCatalogRequest other = + (com.google.cloud.datacatalog.v1.SearchCatalogRequest) obj; + + if (hasScope() != other.hasScope()) return false; + if (hasScope()) { + if (!getScope().equals(other.getScope())) return false; + } + if (!getQuery().equals(other.getQuery())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.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 (hasScope()) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + } + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().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) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.SearchCatalogRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SearchCatalogRequest) + com.google.cloud.datacatalog.v1.SearchCatalogRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.class, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SearchCatalogRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (scopeBuilder_ == null) { + scope_ = null; + } else { + scope_ = null; + scopeBuilder_ = null; + } + query_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SearchCatalogRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest build() { + com.google.cloud.datacatalog.v1.SearchCatalogRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest buildPartial() { + com.google.cloud.datacatalog.v1.SearchCatalogRequest result = + new com.google.cloud.datacatalog.v1.SearchCatalogRequest(this); + if (scopeBuilder_ == null) { + result.scope_ = scope_; + } else { + result.scope_ = scopeBuilder_.build(); + } + result.query_ = query_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.SearchCatalogRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.SearchCatalogRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SearchCatalogRequest other) { + if (other == com.google.cloud.datacatalog.v1.SearchCatalogRequest.getDefaultInstance()) + return this; + if (other.hasScope()) { + mergeScope(other.getScope()); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + 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.cloud.datacatalog.v1.SearchCatalogRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SearchCatalogRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder> + scopeBuilder_; + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + public boolean hasScope() { + return scopeBuilder_ != null || scope_ != null; + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope getScope() { + if (scopeBuilder_ == null) { + return scope_ == null + ? com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.getDefaultInstance() + : scope_; + } else { + return scopeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScope(com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope value) { + if (scopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + onChanged(); + } else { + scopeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScope( + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder builderForValue) { + if (scopeBuilder_ == null) { + scope_ = builderForValue.build(); + onChanged(); + } else { + scopeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeScope(com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope value) { + if (scopeBuilder_ == null) { + if (scope_ != null) { + scope_ = + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.newBuilder(scope_) + .mergeFrom(value) + .buildPartial(); + } else { + scope_ = value; + } + onChanged(); + } else { + scopeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearScope() { + if (scopeBuilder_ == null) { + scope_ = null; + onChanged(); + } else { + scope_ = null; + scopeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder getScopeBuilder() { + + onChanged(); + return getScopeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getScopeOrBuilder() { + if (scopeBuilder_ != null) { + return scopeBuilder_.getMessageOrBuilder(); + } else { + return scope_ == null + ? com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.getDefaultInstance() + : scope_; + } + } + /** + * + * + *
+     * Required. The scope of this search request. A `scope` that has empty
+     * `include_org_ids`, `include_project_ids` AND false
+     * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+     * return an error in such a case.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder> + getScopeFieldBuilder() { + if (scopeBuilder_ == null) { + scopeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder>( + getScope(), getParentForChildren(), isClean()); + scope_ = null; + } + return scopeBuilder_; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * Required. The query string in search query syntax. The query must be non-empty.
+     * Query strings can be simple as "x" or more qualified as:
+     * * name:x
+     * * column:x
+     * * description:y
+     * Note: Query tokens need to have a minimum of 3 characters for substring
+     * matching to work correctly. See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The query string in search query syntax. The query must be non-empty.
+     * Query strings can be simple as "x" or more qualified as:
+     * * name:x
+     * * column:x
+     * * description:y
+     * Note: Query tokens need to have a minimum of 3 characters for substring
+     * matching to work correctly. See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The query string in search query syntax. The query must be non-empty.
+     * Query strings can be simple as "x" or more qualified as:
+     * * name:x
+     * * column:x
+     * * description:y
+     * Note: Query tokens need to have a minimum of 3 characters for substring
+     * matching to work correctly. See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The query string in search query syntax. The query must be non-empty.
+     * Query strings can be simple as "x" or more qualified as:
+     * * name:x
+     * * column:x
+     * * description:y
+     * Note: Query tokens need to have a minimum of 3 characters for substring
+     * matching to work correctly. See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The query string in search query syntax. The query must be non-empty.
+     * Query strings can be simple as "x" or more qualified as:
+     * * name:x
+     * * column:x
+     * * description:y
+     * Note: Query tokens need to have a minimum of 3 characters for substring
+     * matching to work correctly. See [Data Catalog Search
+     * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+     * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of results in the search page. If <=0 then defaults to 10. Max limit
+     * for page_size is 1000. Throws an invalid argument for page_size > 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of results in the search page. If <=0 then defaults to 10. Max limit
+     * for page_size is 1000. Throws an invalid argument for page_size > 1000.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Number of results in the search page. If <=0 then defaults to 10. Max limit
+     * for page_size is 1000. Throws an invalid argument for page_size > 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. Pagination token returned in an earlier
+     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+     * indicates that this is a continuation of a prior
+     * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+     * call, and that the system should return the next page of data. If empty,
+     * the first page is returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Pagination token returned in an earlier
+     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+     * indicates that this is a continuation of a prior
+     * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+     * call, and that the system should return the next page of data. If empty,
+     * the first page is returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Pagination token returned in an earlier
+     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+     * indicates that this is a continuation of a prior
+     * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+     * call, and that the system should return the next page of data. If empty,
+     * the first page is returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Pagination token returned in an earlier
+     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+     * indicates that this is a continuation of a prior
+     * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+     * call, and that the system should return the next page of data. If empty,
+     * the first page is returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Pagination token returned in an earlier
+     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+     * indicates that this is a continuation of a prior
+     * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+     * call, and that the system should return the next page of data. If empty,
+     * the first page is returned.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Specifies the ordering of results, currently supported case-sensitive
+     * choices are:
+     *   * `relevance`, only supports descending
+     *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+     *     specified
+     * If not specified, defaults to `relevance` descending.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Specifies the ordering of results, currently supported case-sensitive
+     * choices are:
+     *   * `relevance`, only supports descending
+     *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+     *     specified
+     * If not specified, defaults to `relevance` descending.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Specifies the ordering of results, currently supported case-sensitive
+     * choices are:
+     *   * `relevance`, only supports descending
+     *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+     *     specified
+     * If not specified, defaults to `relevance` descending.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * Specifies the ordering of results, currently supported case-sensitive
+     * choices are:
+     *   * `relevance`, only supports descending
+     *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+     *     specified
+     * If not specified, defaults to `relevance` descending.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the ordering of results, currently supported case-sensitive
+     * choices are:
+     *   * `relevance`, only supports descending
+     *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+     *     specified
+     * If not specified, defaults to `relevance` descending.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.SearchCatalogRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SearchCatalogRequest) + private static final com.google.cloud.datacatalog.v1.SearchCatalogRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SearchCatalogRequest(); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchCatalogRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchCatalogRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java new file mode 100644 index 00000000..74d27818 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java @@ -0,0 +1,198 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface SearchCatalogRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SearchCatalogRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scope field is set. + */ + boolean hasScope(); + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scope. + */ + com.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope getScope(); + /** + * + * + *
+   * Required. The scope of this search request. A `scope` that has empty
+   * `include_org_ids`, `include_project_ids` AND false
+   * `include_gcp_public_datasets` is considered invalid. Data Catalog will
+   * return an error in such a case.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.SearchCatalogRequest.Scope scope = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getScopeOrBuilder(); + + /** + * + * + *
+   * Required. The query string in search query syntax. The query must be non-empty.
+   * Query strings can be simple as "x" or more qualified as:
+   * * name:x
+   * * column:x
+   * * description:y
+   * Note: Query tokens need to have a minimum of 3 characters for substring
+   * matching to work correctly. See [Data Catalog Search
+   * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+   * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * Required. The query string in search query syntax. The query must be non-empty.
+   * Query strings can be simple as "x" or more qualified as:
+   * * name:x
+   * * column:x
+   * * description:y
+   * Note: Query tokens need to have a minimum of 3 characters for substring
+   * matching to work correctly. See [Data Catalog Search
+   * Syntax](/data-catalog/docs/how-to/search-reference) for more information.
+   * 
+ * + * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Number of results in the search page. If <=0 then defaults to 10. Max limit
+   * for page_size is 1000. Throws an invalid argument for page_size > 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Pagination token returned in an earlier
+   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+   * indicates that this is a continuation of a prior
+   * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+   * call, and that the system should return the next page of data. If empty,
+   * the first page is returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Pagination token returned in an earlier
+   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
+   * indicates that this is a continuation of a prior
+   * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
+   * call, and that the system should return the next page of data. If empty,
+   * the first page is returned.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Specifies the ordering of results, currently supported case-sensitive
+   * choices are:
+   *   * `relevance`, only supports descending
+   *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+   *     specified
+   * If not specified, defaults to `relevance` descending.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Specifies the ordering of results, currently supported case-sensitive
+   * choices are:
+   *   * `relevance`, only supports descending
+   *   * `last_modified_timestamp [asc|desc]`, defaults to descending if not
+   *     specified
+   * If not specified, defaults to `relevance` descending.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java new file mode 100644 index 00000000..95b04fff --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java @@ -0,0 +1,1135 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Response message for
+ * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogResponse} + */ +public final class SearchCatalogResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SearchCatalogResponse) + SearchCatalogResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchCatalogResponse.newBuilder() to construct. + private SearchCatalogResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchCatalogResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchCatalogResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchCatalogResponse( + 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)) { + results_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.SearchCatalogResult.parser(), + extensionRegistry)); + break; + } + case 26: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogResponse.class, + com.google.cloud.datacatalog.v1.SearchCatalogResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public java.util.List getResultsList() { + return results_; + } + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResult getResults(int index) { + return results_.get(index); + } + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token that can be used to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + 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 token that can be used to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + 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 < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, 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 < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, 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.cloud.datacatalog.v1.SearchCatalogResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SearchCatalogResponse other = + (com.google.cloud.datacatalog.v1.SearchCatalogResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) 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 (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().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.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.SearchCatalogResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SearchCatalogResponse) + com.google.cloud.datacatalog.v1.SearchCatalogResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogResponse.class, + com.google.cloud.datacatalog.v1.SearchCatalogResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SearchCatalogResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SearchCatalogResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResponse build() { + com.google.cloud.datacatalog.v1.SearchCatalogResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResponse buildPartial() { + com.google.cloud.datacatalog.v1.SearchCatalogResponse result = + new com.google.cloud.datacatalog.v1.SearchCatalogResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.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.cloud.datacatalog.v1.SearchCatalogResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.SearchCatalogResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SearchCatalogResponse other) { + if (other == com.google.cloud.datacatalog.v1.SearchCatalogResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + 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.cloud.datacatalog.v1.SearchCatalogResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SearchCatalogResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogResult, + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.datacatalog.v1.SearchCatalogResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder addResults(com.google.cloud.datacatalog.v1.SearchCatalogResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.datacatalog.v1.SearchCatalogResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder addResults( + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + 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; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.SearchCatalogResult.getDefaultInstance()); + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.v1.SearchCatalogResult.getDefaultInstance()); + } + /** + * + * + *
+     * Search results.
+     * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogResult, + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SearchCatalogResult, + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder, + com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token that can be used to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 3; + * + * @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 token that can be used to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 3; + * + * @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 token that can be used to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 3; + * + * @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 token that can be used to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token that can be used to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 3; + * + * @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.cloud.datacatalog.v1.SearchCatalogResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SearchCatalogResponse) + private static final com.google.cloud.datacatalog.v1.SearchCatalogResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SearchCatalogResponse(); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchCatalogResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchCatalogResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java new file mode 100644 index 00000000..bae4f245 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface SearchCatalogResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SearchCatalogResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + java.util.List getResultsList(); + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + com.google.cloud.datacatalog.v1.SearchCatalogResult getResults(int index); + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + int getResultsCount(); + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + * + * + *
+   * Search results.
+   * 
+ * + * repeated .google.cloud.datacatalog.v1.SearchCatalogResult results = 1; + */ + com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder getResultsOrBuilder(int index); + + /** + * + * + *
+   * The token that can be used to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token that can be used to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java new file mode 100644 index 00000000..7b3a4724 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java @@ -0,0 +1,1689 @@ +/* + * 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/cloud/datacatalog/v1/search.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * A result that appears in the response of a search request. Each result
+ * captures details of one entry that matches the search.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogResult} + */ +public final class SearchCatalogResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SearchCatalogResult) + SearchCatalogResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchCatalogResult.newBuilder() to construct. + private SearchCatalogResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchCatalogResult() { + searchResultType_ = 0; + searchResultSubtype_ = ""; + relativeResourceName_ = ""; + linkedResource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchCatalogResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchCatalogResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder 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(); + + searchResultType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + searchResultSubtype_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + relativeResourceName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + linkedResource_ = s; + break; + } + case 64: + { + int rawValue = input.readEnum(); + systemCase_ = 8; + system_ = rawValue; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + systemCase_ = 9; + system_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Search + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Search + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogResult.class, + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder.class); + } + + private int systemCase_ = 0; + private java.lang.Object system_; + + public enum SystemCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTEGRATED_SYSTEM(8), + USER_SPECIFIED_SYSTEM(9), + SYSTEM_NOT_SET(0); + private final int value; + + private SystemCase(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 SystemCase valueOf(int value) { + return forNumber(value); + } + + public static SystemCase forNumber(int value) { + switch (value) { + case 8: + return INTEGRATED_SYSTEM; + case 9: + return USER_SPECIFIED_SYSTEM; + case 0: + return SYSTEM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SystemCase getSystemCase() { + return SystemCase.forNumber(systemCase_); + } + + public static final int SEARCH_RESULT_TYPE_FIELD_NUMBER = 1; + private int searchResultType_; + /** + * + * + *
+   * Type of the search result. This field can be used to determine which Get
+   * method to call to fetch the full resource.
+   * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The enum numeric value on the wire for searchResultType. + */ + public int getSearchResultTypeValue() { + return searchResultType_; + } + /** + * + * + *
+   * Type of the search result. This field can be used to determine which Get
+   * method to call to fetch the full resource.
+   * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The searchResultType. + */ + public com.google.cloud.datacatalog.v1.SearchResultType getSearchResultType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.SearchResultType result = + com.google.cloud.datacatalog.v1.SearchResultType.valueOf(searchResultType_); + return result == null ? com.google.cloud.datacatalog.v1.SearchResultType.UNRECOGNIZED : result; + } + + public static final int SEARCH_RESULT_SUBTYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object searchResultSubtype_; + /** + * + * + *
+   * Sub-type of the search result. This is a dot-delimited description of the
+   * resource's full type, and is the same as the value callers would provide in
+   * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+   * `tagTemplate`.
+   * 
+ * + * string search_result_subtype = 2; + * + * @return The searchResultSubtype. + */ + public java.lang.String getSearchResultSubtype() { + java.lang.Object ref = searchResultSubtype_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchResultSubtype_ = s; + return s; + } + } + /** + * + * + *
+   * Sub-type of the search result. This is a dot-delimited description of the
+   * resource's full type, and is the same as the value callers would provide in
+   * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+   * `tagTemplate`.
+   * 
+ * + * string search_result_subtype = 2; + * + * @return The bytes for searchResultSubtype. + */ + public com.google.protobuf.ByteString getSearchResultSubtypeBytes() { + java.lang.Object ref = searchResultSubtype_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchResultSubtype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIVE_RESOURCE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object relativeResourceName_; + /** + * + * + *
+   * The relative resource name of the resource in URL format.
+   * Examples:
+   *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+   *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+   * 
+ * + * string relative_resource_name = 3; + * + * @return The relativeResourceName. + */ + public java.lang.String getRelativeResourceName() { + java.lang.Object ref = relativeResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativeResourceName_ = s; + return s; + } + } + /** + * + * + *
+   * The relative resource name of the resource in URL format.
+   * Examples:
+   *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+   *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+   * 
+ * + * string relative_resource_name = 3; + * + * @return The bytes for relativeResourceName. + */ + public com.google.protobuf.ByteString getRelativeResourceNameBytes() { + java.lang.Object ref = relativeResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativeResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINKED_RESOURCE_FIELD_NUMBER = 4; + private volatile java.lang.Object linkedResource_; + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Example:
+   *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+   * 
+ * + * string linked_resource = 4; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Example:
+   *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+   * 
+ * + * string linked_resource = 4; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTEGRATED_SYSTEM_FIELD_NUMBER = 8; + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Cloud Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + public int getIntegratedSystemValue() { + if (systemCase_ == 8) { + return (java.lang.Integer) system_; + } + return 0; + } + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Cloud Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + public com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem() { + if (systemCase_ == 8) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.IntegratedSystem result = + com.google.cloud.datacatalog.v1.IntegratedSystem.valueOf((java.lang.Integer) system_); + return result == null + ? com.google.cloud.datacatalog.v1.IntegratedSystem.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.IntegratedSystem.INTEGRATED_SYSTEM_UNSPECIFIED; + } + + public static final int USER_SPECIFIED_SYSTEM_FIELD_NUMBER = 9; + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with.
+   * 
+ * + * string user_specified_system = 9; + * + * @return The userSpecifiedSystem. + */ + public java.lang.String getUserSpecifiedSystem() { + java.lang.Object ref = ""; + if (systemCase_ == 9) { + ref = system_; + } + if (ref instanceof java.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 (systemCase_ == 9) { + system_ = s; + } + return s; + } + } + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with.
+   * 
+ * + * string user_specified_system = 9; + * + * @return The bytes for userSpecifiedSystem. + */ + public com.google.protobuf.ByteString getUserSpecifiedSystemBytes() { + java.lang.Object ref = ""; + if (systemCase_ == 9) { + ref = system_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (systemCase_ == 9) { + system_ = 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 (searchResultType_ + != com.google.cloud.datacatalog.v1.SearchResultType.SEARCH_RESULT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, searchResultType_); + } + if (!getSearchResultSubtypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, searchResultSubtype_); + } + if (!getRelativeResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relativeResourceName_); + } + if (!getLinkedResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, linkedResource_); + } + if (systemCase_ == 8) { + output.writeEnum(8, ((java.lang.Integer) system_)); + } + if (systemCase_ == 9) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, system_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (searchResultType_ + != com.google.cloud.datacatalog.v1.SearchResultType.SEARCH_RESULT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, searchResultType_); + } + if (!getSearchResultSubtypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, searchResultSubtype_); + } + if (!getRelativeResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relativeResourceName_); + } + if (!getLinkedResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, linkedResource_); + } + if (systemCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(8, ((java.lang.Integer) system_)); + } + if (systemCase_ == 9) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, system_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SearchCatalogResult)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SearchCatalogResult other = + (com.google.cloud.datacatalog.v1.SearchCatalogResult) obj; + + if (searchResultType_ != other.searchResultType_) return false; + if (!getSearchResultSubtype().equals(other.getSearchResultSubtype())) return false; + if (!getRelativeResourceName().equals(other.getRelativeResourceName())) return false; + if (!getLinkedResource().equals(other.getLinkedResource())) return false; + if (!getSystemCase().equals(other.getSystemCase())) return false; + switch (systemCase_) { + case 8: + if (getIntegratedSystemValue() != other.getIntegratedSystemValue()) return false; + break; + case 9: + if (!getUserSpecifiedSystem().equals(other.getUserSpecifiedSystem())) 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) + SEARCH_RESULT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + searchResultType_; + hash = (37 * hash) + SEARCH_RESULT_SUBTYPE_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultSubtype().hashCode(); + hash = (37 * hash) + RELATIVE_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRelativeResourceName().hashCode(); + hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLinkedResource().hashCode(); + switch (systemCase_) { + case 8: + hash = (37 * hash) + INTEGRATED_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getIntegratedSystemValue(); + break; + case 9: + hash = (37 * hash) + USER_SPECIFIED_SYSTEM_FIELD_NUMBER; + hash = (53 * hash) + getUserSpecifiedSystem().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.SearchCatalogResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 result that appears in the response of a search request. Each result
+   * captures details of one entry that matches the search.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SearchCatalogResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SearchCatalogResult) + com.google.cloud.datacatalog.v1.SearchCatalogResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Search + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Search + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SearchCatalogResult.class, + com.google.cloud.datacatalog.v1.SearchCatalogResult.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SearchCatalogResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + searchResultType_ = 0; + + searchResultSubtype_ = ""; + + relativeResourceName_ = ""; + + linkedResource_ = ""; + + systemCase_ = 0; + system_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Search + .internal_static_google_cloud_datacatalog_v1_SearchCatalogResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResult getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SearchCatalogResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResult build() { + com.google.cloud.datacatalog.v1.SearchCatalogResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResult buildPartial() { + com.google.cloud.datacatalog.v1.SearchCatalogResult result = + new com.google.cloud.datacatalog.v1.SearchCatalogResult(this); + result.searchResultType_ = searchResultType_; + result.searchResultSubtype_ = searchResultSubtype_; + result.relativeResourceName_ = relativeResourceName_; + result.linkedResource_ = linkedResource_; + if (systemCase_ == 8) { + result.system_ = system_; + } + if (systemCase_ == 9) { + result.system_ = system_; + } + result.systemCase_ = systemCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.SearchCatalogResult) { + return mergeFrom((com.google.cloud.datacatalog.v1.SearchCatalogResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SearchCatalogResult other) { + if (other == com.google.cloud.datacatalog.v1.SearchCatalogResult.getDefaultInstance()) + return this; + if (other.searchResultType_ != 0) { + setSearchResultTypeValue(other.getSearchResultTypeValue()); + } + if (!other.getSearchResultSubtype().isEmpty()) { + searchResultSubtype_ = other.searchResultSubtype_; + onChanged(); + } + if (!other.getRelativeResourceName().isEmpty()) { + relativeResourceName_ = other.relativeResourceName_; + onChanged(); + } + if (!other.getLinkedResource().isEmpty()) { + linkedResource_ = other.linkedResource_; + onChanged(); + } + switch (other.getSystemCase()) { + case INTEGRATED_SYSTEM: + { + setIntegratedSystemValue(other.getIntegratedSystemValue()); + break; + } + case USER_SPECIFIED_SYSTEM: + { + systemCase_ = 9; + system_ = other.system_; + onChanged(); + break; + } + case SYSTEM_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.cloud.datacatalog.v1.SearchCatalogResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SearchCatalogResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int systemCase_ = 0; + private java.lang.Object system_; + + public SystemCase getSystemCase() { + return SystemCase.forNumber(systemCase_); + } + + public Builder clearSystem() { + systemCase_ = 0; + system_ = null; + onChanged(); + return this; + } + + private int searchResultType_ = 0; + /** + * + * + *
+     * Type of the search result. This field can be used to determine which Get
+     * method to call to fetch the full resource.
+     * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The enum numeric value on the wire for searchResultType. + */ + public int getSearchResultTypeValue() { + return searchResultType_; + } + /** + * + * + *
+     * Type of the search result. This field can be used to determine which Get
+     * method to call to fetch the full resource.
+     * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @param value The enum numeric value on the wire for searchResultType to set. + * @return This builder for chaining. + */ + public Builder setSearchResultTypeValue(int value) { + searchResultType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the search result. This field can be used to determine which Get
+     * method to call to fetch the full resource.
+     * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The searchResultType. + */ + public com.google.cloud.datacatalog.v1.SearchResultType getSearchResultType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.SearchResultType result = + com.google.cloud.datacatalog.v1.SearchResultType.valueOf(searchResultType_); + return result == null + ? com.google.cloud.datacatalog.v1.SearchResultType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the search result. This field can be used to determine which Get
+     * method to call to fetch the full resource.
+     * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @param value The searchResultType to set. + * @return This builder for chaining. + */ + public Builder setSearchResultType(com.google.cloud.datacatalog.v1.SearchResultType value) { + if (value == null) { + throw new NullPointerException(); + } + + searchResultType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the search result. This field can be used to determine which Get
+     * method to call to fetch the full resource.
+     * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearchResultType() { + + searchResultType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object searchResultSubtype_ = ""; + /** + * + * + *
+     * Sub-type of the search result. This is a dot-delimited description of the
+     * resource's full type, and is the same as the value callers would provide in
+     * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+     * `tagTemplate`.
+     * 
+ * + * string search_result_subtype = 2; + * + * @return The searchResultSubtype. + */ + public java.lang.String getSearchResultSubtype() { + java.lang.Object ref = searchResultSubtype_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchResultSubtype_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sub-type of the search result. This is a dot-delimited description of the
+     * resource's full type, and is the same as the value callers would provide in
+     * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+     * `tagTemplate`.
+     * 
+ * + * string search_result_subtype = 2; + * + * @return The bytes for searchResultSubtype. + */ + public com.google.protobuf.ByteString getSearchResultSubtypeBytes() { + java.lang.Object ref = searchResultSubtype_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchResultSubtype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sub-type of the search result. This is a dot-delimited description of the
+     * resource's full type, and is the same as the value callers would provide in
+     * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+     * `tagTemplate`.
+     * 
+ * + * string search_result_subtype = 2; + * + * @param value The searchResultSubtype to set. + * @return This builder for chaining. + */ + public Builder setSearchResultSubtype(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + searchResultSubtype_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-type of the search result. This is a dot-delimited description of the
+     * resource's full type, and is the same as the value callers would provide in
+     * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+     * `tagTemplate`.
+     * 
+ * + * string search_result_subtype = 2; + * + * @return This builder for chaining. + */ + public Builder clearSearchResultSubtype() { + + searchResultSubtype_ = getDefaultInstance().getSearchResultSubtype(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sub-type of the search result. This is a dot-delimited description of the
+     * resource's full type, and is the same as the value callers would provide in
+     * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+     * `tagTemplate`.
+     * 
+ * + * string search_result_subtype = 2; + * + * @param value The bytes for searchResultSubtype to set. + * @return This builder for chaining. + */ + public Builder setSearchResultSubtypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + searchResultSubtype_ = value; + onChanged(); + return this; + } + + private java.lang.Object relativeResourceName_ = ""; + /** + * + * + *
+     * The relative resource name of the resource in URL format.
+     * Examples:
+     *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+     *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+     * 
+ * + * string relative_resource_name = 3; + * + * @return The relativeResourceName. + */ + public java.lang.String getRelativeResourceName() { + java.lang.Object ref = relativeResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativeResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The relative resource name of the resource in URL format.
+     * Examples:
+     *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+     *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+     * 
+ * + * string relative_resource_name = 3; + * + * @return The bytes for relativeResourceName. + */ + public com.google.protobuf.ByteString getRelativeResourceNameBytes() { + java.lang.Object ref = relativeResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativeResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The relative resource name of the resource in URL format.
+     * Examples:
+     *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+     *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+     * 
+ * + * string relative_resource_name = 3; + * + * @param value The relativeResourceName to set. + * @return This builder for chaining. + */ + public Builder setRelativeResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + relativeResourceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the resource in URL format.
+     * Examples:
+     *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+     *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+     * 
+ * + * string relative_resource_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearRelativeResourceName() { + + relativeResourceName_ = getDefaultInstance().getRelativeResourceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the resource in URL format.
+     * Examples:
+     *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+     *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+     * 
+ * + * string relative_resource_name = 3; + * + * @param value The bytes for relativeResourceName to set. + * @return This builder for chaining. + */ + public Builder setRelativeResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + relativeResourceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object linkedResource_ = ""; + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Example:
+     *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+     * 
+ * + * string linked_resource = 4; + * + * @return The linkedResource. + */ + public java.lang.String getLinkedResource() { + java.lang.Object ref = linkedResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Example:
+     *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+     * 
+ * + * string linked_resource = 4; + * + * @return The bytes for linkedResource. + */ + public com.google.protobuf.ByteString getLinkedResourceBytes() { + java.lang.Object ref = linkedResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Example:
+     *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+     * 
+ * + * string linked_resource = 4; + * + * @param value The linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + linkedResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Example:
+     *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+     * 
+ * + * string linked_resource = 4; + * + * @return This builder for chaining. + */ + public Builder clearLinkedResource() { + + linkedResource_ = getDefaultInstance().getLinkedResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the cloud resource the entry belongs to. See:
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+     * Example:
+     *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+     * 
+ * + * string linked_resource = 4; + * + * @param value The bytes for linkedResource to set. + * @return This builder for chaining. + */ + public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + linkedResource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Cloud Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + public int getIntegratedSystemValue() { + if (systemCase_ == 8) { + return ((java.lang.Integer) system_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Cloud Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for integratedSystem to set. + * @return This builder for chaining. + */ + public Builder setIntegratedSystemValue(int value) { + systemCase_ = 8; + system_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Cloud Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + public com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem() { + if (systemCase_ == 8) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.IntegratedSystem result = + com.google.cloud.datacatalog.v1.IntegratedSystem.valueOf((java.lang.Integer) system_); + return result == null + ? com.google.cloud.datacatalog.v1.IntegratedSystem.UNRECOGNIZED + : result; + } + return com.google.cloud.datacatalog.v1.IntegratedSystem.INTEGRATED_SYSTEM_UNSPECIFIED; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Cloud Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The integratedSystem to set. + * @return This builder for chaining. + */ + public Builder setIntegratedSystem(com.google.cloud.datacatalog.v1.IntegratedSystem value) { + if (value == null) { + throw new NullPointerException(); + } + systemCase_ = 8; + system_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field indicates the entry's source system that Data Catalog
+     * integrates with, such as BigQuery or Cloud Pub/Sub.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIntegratedSystem() { + if (systemCase_ == 8) { + systemCase_ = 0; + system_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with.
+     * 
+ * + * string user_specified_system = 9; + * + * @return The userSpecifiedSystem. + */ + public java.lang.String getUserSpecifiedSystem() { + java.lang.Object ref = ""; + if (systemCase_ == 9) { + ref = system_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (systemCase_ == 9) { + system_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with.
+     * 
+ * + * string user_specified_system = 9; + * + * @return The bytes for userSpecifiedSystem. + */ + public com.google.protobuf.ByteString getUserSpecifiedSystemBytes() { + java.lang.Object ref = ""; + if (systemCase_ == 9) { + ref = system_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (systemCase_ == 9) { + system_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with.
+     * 
+ * + * string user_specified_system = 9; + * + * @param value The userSpecifiedSystem to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedSystem(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + systemCase_ = 9; + system_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with.
+     * 
+ * + * string user_specified_system = 9; + * + * @return This builder for chaining. + */ + public Builder clearUserSpecifiedSystem() { + if (systemCase_ == 9) { + systemCase_ = 0; + system_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * This field indicates the entry's source system that Data Catalog does not
+     * integrate with.
+     * 
+ * + * string user_specified_system = 9; + * + * @param value The bytes for userSpecifiedSystem to set. + * @return This builder for chaining. + */ + public Builder setUserSpecifiedSystemBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + systemCase_ = 9; + system_ = 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.cloud.datacatalog.v1.SearchCatalogResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SearchCatalogResult) + private static final com.google.cloud.datacatalog.v1.SearchCatalogResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SearchCatalogResult(); + } + + public static com.google.cloud.datacatalog.v1.SearchCatalogResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchCatalogResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchCatalogResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SearchCatalogResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java new file mode 100644 index 00000000..8d5121ee --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java @@ -0,0 +1,205 @@ +/* + * 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/cloud/datacatalog/v1/search.proto + +package com.google.cloud.datacatalog.v1; + +public interface SearchCatalogResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SearchCatalogResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the search result. This field can be used to determine which Get
+   * method to call to fetch the full resource.
+   * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The enum numeric value on the wire for searchResultType. + */ + int getSearchResultTypeValue(); + /** + * + * + *
+   * Type of the search result. This field can be used to determine which Get
+   * method to call to fetch the full resource.
+   * 
+ * + * .google.cloud.datacatalog.v1.SearchResultType search_result_type = 1; + * + * @return The searchResultType. + */ + com.google.cloud.datacatalog.v1.SearchResultType getSearchResultType(); + + /** + * + * + *
+   * Sub-type of the search result. This is a dot-delimited description of the
+   * resource's full type, and is the same as the value callers would provide in
+   * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+   * `tagTemplate`.
+   * 
+ * + * string search_result_subtype = 2; + * + * @return The searchResultSubtype. + */ + java.lang.String getSearchResultSubtype(); + /** + * + * + *
+   * Sub-type of the search result. This is a dot-delimited description of the
+   * resource's full type, and is the same as the value callers would provide in
+   * the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
+   * `tagTemplate`.
+   * 
+ * + * string search_result_subtype = 2; + * + * @return The bytes for searchResultSubtype. + */ + com.google.protobuf.ByteString getSearchResultSubtypeBytes(); + + /** + * + * + *
+   * The relative resource name of the resource in URL format.
+   * Examples:
+   *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+   *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+   * 
+ * + * string relative_resource_name = 3; + * + * @return The relativeResourceName. + */ + java.lang.String getRelativeResourceName(); + /** + * + * + *
+   * The relative resource name of the resource in URL format.
+   * Examples:
+   *  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
+   *  * `projects/{project_id}/tagTemplates/{tag_template_id}`
+   * 
+ * + * string relative_resource_name = 3; + * + * @return The bytes for relativeResourceName. + */ + com.google.protobuf.ByteString getRelativeResourceNameBytes(); + + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Example:
+   *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+   * 
+ * + * string linked_resource = 4; + * + * @return The linkedResource. + */ + java.lang.String getLinkedResource(); + /** + * + * + *
+   * The full name of the cloud resource the entry belongs to. See:
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name.
+   * Example:
+   *  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
+   * 
+ * + * string linked_resource = 4; + * + * @return The bytes for linkedResource. + */ + com.google.protobuf.ByteString getLinkedResourceBytes(); + + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Cloud Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for integratedSystem. + */ + int getIntegratedSystemValue(); + /** + * + * + *
+   * Output only. This field indicates the entry's source system that Data Catalog
+   * integrates with, such as BigQuery or Cloud Pub/Sub.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.IntegratedSystem integrated_system = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The integratedSystem. + */ + com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem(); + + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with.
+   * 
+ * + * string user_specified_system = 9; + * + * @return The userSpecifiedSystem. + */ + java.lang.String getUserSpecifiedSystem(); + /** + * + * + *
+   * This field indicates the entry's source system that Data Catalog does not
+   * integrate with.
+   * 
+ * + * string user_specified_system = 9; + * + * @return The bytes for userSpecifiedSystem. + */ + com.google.protobuf.ByteString getUserSpecifiedSystemBytes(); + + public com.google.cloud.datacatalog.v1.SearchCatalogResult.SystemCase getSystemCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchResultType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchResultType.java new file mode 100644 index 00000000..8a4662a4 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchResultType.java @@ -0,0 +1,194 @@ +/* + * 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/cloud/datacatalog/v1/search.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * The different types of resources that can be returned in search.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1.SearchResultType} + */ +public enum SearchResultType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + */ + SEARCH_RESULT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * An [Entry][google.cloud.datacatalog.v1.Entry].
+   * 
+ * + * ENTRY = 1; + */ + ENTRY(1), + /** + * + * + *
+   * A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate].
+   * 
+ * + * TAG_TEMPLATE = 2; + */ + TAG_TEMPLATE(2), + /** + * + * + *
+   * An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * 
+ * + * ENTRY_GROUP = 3; + */ + ENTRY_GROUP(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + */ + public static final int SEARCH_RESULT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * An [Entry][google.cloud.datacatalog.v1.Entry].
+   * 
+ * + * ENTRY = 1; + */ + public static final int ENTRY_VALUE = 1; + /** + * + * + *
+   * A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate].
+   * 
+ * + * TAG_TEMPLATE = 2; + */ + public static final int TAG_TEMPLATE_VALUE = 2; + /** + * + * + *
+   * An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
+   * 
+ * + * ENTRY_GROUP = 3; + */ + public static final int ENTRY_GROUP_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 SearchResultType 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 SearchResultType forNumber(int value) { + switch (value) { + case 0: + return SEARCH_RESULT_TYPE_UNSPECIFIED; + case 1: + return ENTRY; + case 2: + return TAG_TEMPLATE; + case 3: + return ENTRY_GROUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SearchResultType findValueByNumber(int number) { + return SearchResultType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.cloud.datacatalog.v1.Search.getDescriptor().getEnumTypes().get(0); + } + + private static final SearchResultType[] VALUES = values(); + + public static SearchResultType 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 SearchResultType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.SearchResultType) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestamps.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestamps.java new file mode 100644 index 00000000..4b170f55 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestamps.java @@ -0,0 +1,1295 @@ +/* + * 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/cloud/datacatalog/v1/timestamps.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Timestamps about this resource according to a particular system.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SystemTimestamps} + */ +public final class SystemTimestamps extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SystemTimestamps) + SystemTimestampsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SystemTimestamps.newBuilder() to construct. + private SystemTimestamps(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SystemTimestamps() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SystemTimestamps(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SystemTimestamps( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 (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 18: + { + 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 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Timestamps + .internal_static_google_cloud_datacatalog_v1_SystemTimestamps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Timestamps + .internal_static_google_cloud_datacatalog_v1_SystemTimestamps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SystemTimestamps.class, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (expireTime_ != null) { + output.writeMessage(3, getExpireTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SystemTimestamps)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SystemTimestamps other = + (com.google.cloud.datacatalog.v1.SystemTimestamps) obj; + + 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 (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (!unknownFields.equals(other.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 (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 (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.SystemTimestamps prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Timestamps about this resource according to a particular system.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.SystemTimestamps} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SystemTimestamps) + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Timestamps + .internal_static_google_cloud_datacatalog_v1_SystemTimestamps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Timestamps + .internal_static_google_cloud_datacatalog_v1_SystemTimestamps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SystemTimestamps.class, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SystemTimestamps.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Timestamps + .internal_static_google_cloud_datacatalog_v1_SystemTimestamps_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestamps getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestamps build() { + com.google.cloud.datacatalog.v1.SystemTimestamps result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestamps buildPartial() { + com.google.cloud.datacatalog.v1.SystemTimestamps result = + new com.google.cloud.datacatalog.v1.SystemTimestamps(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.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.cloud.datacatalog.v1.SystemTimestamps) { + return mergeFrom((com.google.cloud.datacatalog.v1.SystemTimestamps) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SystemTimestamps other) { + if (other == com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.SystemTimestamps parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.SystemTimestamps) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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 creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @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 creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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 creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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 creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The creation time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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_; + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + 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; + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + 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; + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The last-modified time of the resource within the given system.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + 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 expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. The expiration time of the resource within the given system.
+     * Currently only apllicable to BigQuery resources.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.SystemTimestamps) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SystemTimestamps) + private static final com.google.cloud.datacatalog.v1.SystemTimestamps DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SystemTimestamps(); + } + + public static com.google.cloud.datacatalog.v1.SystemTimestamps getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SystemTimestamps parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SystemTimestamps(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestamps getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestampsOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestampsOrBuilder.java new file mode 100644 index 00000000..caf7091a --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestampsOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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/cloud/datacatalog/v1/timestamps.proto + +package com.google.cloud.datacatalog.v1; + +public interface SystemTimestampsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SystemTimestamps) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The creation time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The last-modified time of the resource within the given system.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the resource within the given system.
+   * Currently only apllicable to BigQuery resources.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java new file mode 100644 index 00000000..444457f9 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java @@ -0,0 +1,174 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Table source type.
+ * 
+ * + * Protobuf enum {@code google.cloud.datacatalog.v1.TableSourceType} + */ +public enum TableSourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + TABLE_SOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Table view.
+   * 
+ * + * BIGQUERY_VIEW = 2; + */ + BIGQUERY_VIEW(2), + /** + * + * + *
+   * BigQuery native table.
+   * 
+ * + * BIGQUERY_TABLE = 5; + */ + BIGQUERY_TABLE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default unknown type.
+   * 
+ * + * TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int TABLE_SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Table view.
+   * 
+ * + * BIGQUERY_VIEW = 2; + */ + public static final int BIGQUERY_VIEW_VALUE = 2; + /** + * + * + *
+   * BigQuery native table.
+   * 
+ * + * BIGQUERY_TABLE = 5; + */ + public static final int BIGQUERY_TABLE_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 TableSourceType 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 TableSourceType forNumber(int value) { + switch (value) { + case 0: + return TABLE_SOURCE_TYPE_UNSPECIFIED; + case 2: + return BIGQUERY_VIEW; + case 5: + return BIGQUERY_TABLE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TableSourceType findValueByNumber(int number) { + return TableSourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.cloud.datacatalog.v1.TableSpecOuterClass.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TableSourceType[] VALUES = values(); + + public static TableSourceType 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 TableSourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.TableSourceType) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpec.java new file mode 100644 index 00000000..6c8dd469 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpec.java @@ -0,0 +1,674 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Normal BigQuery table spec.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TableSpec} + */ +public final class TableSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.TableSpec) + TableSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableSpec.newBuilder() to construct. + private TableSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TableSpec() { + groupedEntry_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TableSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + groupedEntry_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_TableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TableSpec.class, + com.google.cloud.datacatalog.v1.TableSpec.Builder.class); + } + + public static final int GROUPED_ENTRY_FIELD_NUMBER = 1; + private volatile java.lang.Object groupedEntry_; + /** + * + * + *
+   * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+   * `grouped_entry` is the Data Catalog resource name of the date sharded
+   * grouped entry, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * Otherwise, `grouped_entry` is empty.
+   * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The groupedEntry. + */ + public java.lang.String getGroupedEntry() { + java.lang.Object ref = groupedEntry_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupedEntry_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+   * `grouped_entry` is the Data Catalog resource name of the date sharded
+   * grouped entry, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * Otherwise, `grouped_entry` is empty.
+   * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for groupedEntry. + */ + public com.google.protobuf.ByteString getGroupedEntryBytes() { + java.lang.Object ref = groupedEntry_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupedEntry_ = 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 (!getGroupedEntryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupedEntry_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGroupedEntryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupedEntry_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.TableSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.TableSpec other = + (com.google.cloud.datacatalog.v1.TableSpec) obj; + + if (!getGroupedEntry().equals(other.getGroupedEntry())) return false; + if (!unknownFields.equals(other.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) + GROUPED_ENTRY_FIELD_NUMBER; + hash = (53 * hash) + getGroupedEntry().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TableSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.TableSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Normal BigQuery table spec.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TableSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.TableSpec) + com.google.cloud.datacatalog.v1.TableSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_TableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TableSpec.class, + com.google.cloud.datacatalog.v1.TableSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.TableSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + groupedEntry_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TableSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TableSpec build() { + com.google.cloud.datacatalog.v1.TableSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TableSpec buildPartial() { + com.google.cloud.datacatalog.v1.TableSpec result = + new com.google.cloud.datacatalog.v1.TableSpec(this); + result.groupedEntry_ = groupedEntry_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.TableSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.TableSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.TableSpec other) { + if (other == com.google.cloud.datacatalog.v1.TableSpec.getDefaultInstance()) return this; + if (!other.getGroupedEntry().isEmpty()) { + groupedEntry_ = other.groupedEntry_; + 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.cloud.datacatalog.v1.TableSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.TableSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object groupedEntry_ = ""; + /** + * + * + *
+     * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+     * `grouped_entry` is the Data Catalog resource name of the date sharded
+     * grouped entry, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * Otherwise, `grouped_entry` is empty.
+     * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The groupedEntry. + */ + public java.lang.String getGroupedEntry() { + java.lang.Object ref = groupedEntry_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupedEntry_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+     * `grouped_entry` is the Data Catalog resource name of the date sharded
+     * grouped entry, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * Otherwise, `grouped_entry` is empty.
+     * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for groupedEntry. + */ + public com.google.protobuf.ByteString getGroupedEntryBytes() { + java.lang.Object ref = groupedEntry_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupedEntry_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+     * `grouped_entry` is the Data Catalog resource name of the date sharded
+     * grouped entry, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * Otherwise, `grouped_entry` is empty.
+     * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The groupedEntry to set. + * @return This builder for chaining. + */ + public Builder setGroupedEntry(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + groupedEntry_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+     * `grouped_entry` is the Data Catalog resource name of the date sharded
+     * grouped entry, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * Otherwise, `grouped_entry` is empty.
+     * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearGroupedEntry() { + + groupedEntry_ = getDefaultInstance().getGroupedEntry(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+     * `grouped_entry` is the Data Catalog resource name of the date sharded
+     * grouped entry, for example,
+     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+     * Otherwise, `grouped_entry` is empty.
+     * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for groupedEntry to set. + * @return This builder for chaining. + */ + public Builder setGroupedEntryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + groupedEntry_ = 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.cloud.datacatalog.v1.TableSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.TableSpec) + private static final com.google.cloud.datacatalog.v1.TableSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.TableSpec(); + } + + public static com.google.cloud.datacatalog.v1.TableSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TableSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOrBuilder.java new file mode 100644 index 00000000..2e697b5a --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOrBuilder.java @@ -0,0 +1,62 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface TableSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.TableSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+   * `grouped_entry` is the Data Catalog resource name of the date sharded
+   * grouped entry, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * Otherwise, `grouped_entry` is empty.
+   * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The groupedEntry. + */ + java.lang.String getGroupedEntry(); + /** + * + * + *
+   * Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`,
+   * `grouped_entry` is the Data Catalog resource name of the date sharded
+   * grouped entry, for example,
+   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`.
+   * Otherwise, `grouped_entry` is empty.
+   * 
+ * + * + * string grouped_entry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for groupedEntry. + */ + com.google.protobuf.ByteString getGroupedEntryBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java new file mode 100644 index 00000000..60bd9596 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java @@ -0,0 +1,127 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +public final class TableSpecOuterClass { + private TableSpecOuterClass() {} + + 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_cloud_datacatalog_v1_BigQueryTableSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ViewSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TableSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_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/cloud/datacatalog/v1/table_spec" + + ".proto\022\033google.cloud.datacatalog.v1\032\037goo" + + "gle/api/field_behavior.proto\032\031google/api" + + "/resource.proto\"\350\001\n\021BigQueryTableSpec\022L\n" + + "\021table_source_type\030\001 \001(\0162,.google.cloud." + + "datacatalog.v1.TableSourceTypeB\003\340A\003\022:\n\tv" + + "iew_spec\030\002 \001(\0132%.google.cloud.datacatalo" + + "g.v1.ViewSpecH\000\022<\n\ntable_spec\030\003 \001(\0132&.go" + + "ogle.cloud.datacatalog.v1.TableSpecH\000B\013\n" + + "\ttype_spec\"#\n\010ViewSpec\022\027\n\nview_query\030\001 \001" + + "(\tB\003\340A\003\"L\n\tTableSpec\022?\n\rgrouped_entry\030\001 " + + "\001(\tB(\340A\003\372A\"\n datacatalog.googleapis.com/" + + "Entry\"\211\001\n\027BigQueryDateShardedSpec\0229\n\007dat" + + "aset\030\001 \001(\tB(\340A\003\372A\"\n datacatalog.googleap" + + "is.com/Entry\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\003\022" + + "\030\n\013shard_count\030\003 \001(\003B\003\340A\003*[\n\017TableSource" + + "Type\022!\n\035TABLE_SOURCE_TYPE_UNSPECIFIED\020\000\022" + + "\021\n\rBIGQUERY_VIEW\020\002\022\022\n\016BIGQUERY_TABLE\020\005Bn" + + "\n\037com.google.cloud.datacatalog.v1P\001ZFgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/datacatalog/v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_BigQueryTableSpec_descriptor, + new java.lang.String[] { + "TableSourceType", "ViewSpec", "TableSpec", "TypeSpec", + }); + internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_ViewSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor, + new java.lang.String[] { + "ViewQuery", + }); + internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datacatalog_v1_TableSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TableSpec_descriptor, + new java.lang.String[] { + "GroupedEntry", + }); + internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_BigQueryDateShardedSpec_descriptor, + new java.lang.String[] { + "Dataset", "TablePrefix", "ShardCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java new file mode 100644 index 00000000..7eba909b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java @@ -0,0 +1,1708 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Tags are used to attach custom metadata to Data Catalog resources. Tags
+ * conform to the specifications within their tag template.
+ * See [Data Catalog IAM](/data-catalog/docs/concepts/iam) for information on
+ * the permissions needed to create or view tags.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Tag} + */ +public final class Tag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.Tag) + TagOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tag.newBuilder() to construct. + private Tag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Tag() { + name_ = ""; + template_ = ""; + templateDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Tag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Tag( + 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(); + + template_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = + com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datacatalog.v1.TagField> + fields__ = + input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + fields_.getMutableMap().put(fields__.getKey(), fields__.getValue()); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + scopeCase_ = 4; + scope_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + templateDisplayName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Tag.class, + com.google.cloud.datacatalog.v1.Tag.Builder.class); + } + + private int scopeCase_ = 0; + private java.lang.Object scope_; + + public enum ScopeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COLUMN(4), + SCOPE_NOT_SET(0); + private final int value; + + private ScopeCase(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 ScopeCase valueOf(int value) { + return forNumber(value); + } + + public static ScopeCase forNumber(int value) { + switch (value) { + case 4: + return COLUMN; + case 0: + return SCOPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ScopeCase getScopeCase() { + return ScopeCase.forNumber(scopeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the tag in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * where `tag_id` is a system-generated identifier.
+   * Note that this Tag may not actually be stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + 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 resource name of the tag in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * where `tag_id` is a system-generated identifier.
+   * Note that this Tag may not actually be stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + 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 TEMPLATE_FIELD_NUMBER = 2; + private volatile java.lang.Object template_; + /** + * + * + *
+   * Required. The resource name of the tag template that this tag uses. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * This field cannot be modified after creation.
+   * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The template. + */ + public java.lang.String getTemplate() { + java.lang.Object ref = template_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + template_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tag template that this tag uses. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * This field cannot be modified after creation.
+   * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for template. + */ + public com.google.protobuf.ByteString getTemplateBytes() { + java.lang.Object ref = template_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + template_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEMPLATE_DISPLAY_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object templateDisplayName_; + /** + * + * + *
+   * Output only. The display name of the tag template.
+   * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The templateDisplayName. + */ + public java.lang.String getTemplateDisplayName() { + java.lang.Object ref = templateDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The display name of the tag template.
+   * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for templateDisplayName. + */ + public com.google.protobuf.ByteString getTemplateDisplayNameBytes() { + java.lang.Object ref = templateDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + templateDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_FIELD_NUMBER = 4; + /** + * + * + *
+   * Resources like Entry can have schemas associated with them. This scope
+   * allows users to attach tags to an individual column based on that schema.
+   * For attaching a tag to a nested column, use `.` to separate the column
+   * names. Example:
+   * * `outer_column.inner_column`
+   * 
+ * + * string column = 4; + * + * @return The column. + */ + public java.lang.String getColumn() { + java.lang.Object ref = ""; + if (scopeCase_ == 4) { + ref = scope_; + } + if (ref instanceof java.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 (scopeCase_ == 4) { + scope_ = s; + } + return s; + } + } + /** + * + * + *
+   * Resources like Entry can have schemas associated with them. This scope
+   * allows users to attach tags to an individual column based on that schema.
+   * For attaching a tag to a nested column, use `.` to separate the column
+   * names. Example:
+   * * `outer_column.inner_column`
+   * 
+ * + * string column = 4; + * + * @return The bytes for column. + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = ""; + if (scopeCase_ == 4) { + ref = scope_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (scopeCase_ == 4) { + scope_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELDS_FIELD_NUMBER = 3; + + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datacatalog.v1.TagField> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.datacatalog.v1.TagField.getDefaultInstance()); + } + + private com.google.protobuf.MapField + fields_; + + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public boolean containsFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFields().getMap().containsKey(key); + } + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagField defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagField getFieldsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getTemplateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, template_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetFields(), FieldsDefaultEntryHolder.defaultEntry, 3); + if (scopeCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scope_); + } + if (!getTemplateDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, templateDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getTemplateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, template_); + } + for (java.util.Map.Entry entry : + internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry + fields__ = + FieldsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fields__); + } + if (scopeCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, scope_); + } + if (!getTemplateDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, templateDisplayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.Tag)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.Tag other = (com.google.cloud.datacatalog.v1.Tag) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTemplate().equals(other.getTemplate())) return false; + if (!getTemplateDisplayName().equals(other.getTemplateDisplayName())) return false; + if (!internalGetFields().equals(other.internalGetFields())) return false; + if (!getScopeCase().equals(other.getScopeCase())) return false; + switch (scopeCase_) { + case 4: + if (!getColumn().equals(other.getColumn())) 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) + TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getTemplate().hashCode(); + hash = (37 * hash) + TEMPLATE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTemplateDisplayName().hashCode(); + if (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + switch (scopeCase_) { + case 4: + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumn().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Tag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Tag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Tag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.Tag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tags are used to attach custom metadata to Data Catalog resources. Tags
+   * conform to the specifications within their tag template.
+   * See [Data Catalog IAM](/data-catalog/docs/concepts/iam) for information on
+   * the permissions needed to create or view tags.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.Tag} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.Tag) + com.google.cloud.datacatalog.v1.TagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Tag.class, + com.google.cloud.datacatalog.v1.Tag.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.Tag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + template_ = ""; + + templateDisplayName_ = ""; + + internalGetMutableFields().clear(); + scopeCase_ = 0; + scope_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_Tag_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Tag getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.Tag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Tag build() { + com.google.cloud.datacatalog.v1.Tag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Tag buildPartial() { + com.google.cloud.datacatalog.v1.Tag result = new com.google.cloud.datacatalog.v1.Tag(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.template_ = template_; + result.templateDisplayName_ = templateDisplayName_; + if (scopeCase_ == 4) { + result.scope_ = scope_; + } + result.fields_ = internalGetFields(); + result.fields_.makeImmutable(); + result.scopeCase_ = scopeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.Tag) { + return mergeFrom((com.google.cloud.datacatalog.v1.Tag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.Tag other) { + if (other == com.google.cloud.datacatalog.v1.Tag.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTemplate().isEmpty()) { + template_ = other.template_; + onChanged(); + } + if (!other.getTemplateDisplayName().isEmpty()) { + templateDisplayName_ = other.templateDisplayName_; + onChanged(); + } + internalGetMutableFields().mergeFrom(other.internalGetFields()); + switch (other.getScopeCase()) { + case COLUMN: + { + scopeCase_ = 4; + scope_ = other.scope_; + onChanged(); + break; + } + case SCOPE_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.cloud.datacatalog.v1.Tag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.Tag) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int scopeCase_ = 0; + private java.lang.Object scope_; + + public ScopeCase getScopeCase() { + return ScopeCase.forNumber(scopeCase_); + } + + public Builder clearScope() { + scopeCase_ = 0; + scope_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the tag in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * where `tag_id` is a system-generated identifier.
+     * Note that this Tag may not actually be stored in the location in this 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 resource name of the tag in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * where `tag_id` is a system-generated identifier.
+     * Note that this Tag may not actually be stored in the location in this 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 resource name of the tag in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * where `tag_id` is a system-generated identifier.
+     * Note that this Tag may not actually be stored in the location in this 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 resource name of the tag in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * where `tag_id` is a system-generated identifier.
+     * Note that this Tag may not actually be stored in the location in this name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the tag in URL format. Example:
+     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+     * where `tag_id` is a system-generated identifier.
+     * Note that this Tag may not actually be stored in the location in this 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 java.lang.Object template_ = ""; + /** + * + * + *
+     * Required. The resource name of the tag template that this tag uses. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * This field cannot be modified after creation.
+     * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The template. + */ + public java.lang.String getTemplate() { + java.lang.Object ref = template_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + template_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tag template that this tag uses. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * This field cannot be modified after creation.
+     * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for template. + */ + public com.google.protobuf.ByteString getTemplateBytes() { + java.lang.Object ref = template_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + template_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tag template that this tag uses. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * This field cannot be modified after creation.
+     * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The template to set. + * @return This builder for chaining. + */ + public Builder setTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + template_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tag template that this tag uses. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * This field cannot be modified after creation.
+     * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTemplate() { + + template_ = getDefaultInstance().getTemplate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tag template that this tag uses. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * This field cannot be modified after creation.
+     * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for template to set. + * @return This builder for chaining. + */ + public Builder setTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + template_ = value; + onChanged(); + return this; + } + + private java.lang.Object templateDisplayName_ = ""; + /** + * + * + *
+     * Output only. The display name of the tag template.
+     * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The templateDisplayName. + */ + public java.lang.String getTemplateDisplayName() { + java.lang.Object ref = templateDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The display name of the tag template.
+     * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for templateDisplayName. + */ + public com.google.protobuf.ByteString getTemplateDisplayNameBytes() { + java.lang.Object ref = templateDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + templateDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The display name of the tag template.
+     * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The templateDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTemplateDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + templateDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of the tag template.
+     * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTemplateDisplayName() { + + templateDisplayName_ = getDefaultInstance().getTemplateDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of the tag template.
+     * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for templateDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTemplateDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + templateDisplayName_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Resources like Entry can have schemas associated with them. This scope
+     * allows users to attach tags to an individual column based on that schema.
+     * For attaching a tag to a nested column, use `.` to separate the column
+     * names. Example:
+     * * `outer_column.inner_column`
+     * 
+ * + * string column = 4; + * + * @return The column. + */ + public java.lang.String getColumn() { + java.lang.Object ref = ""; + if (scopeCase_ == 4) { + ref = scope_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (scopeCase_ == 4) { + scope_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resources like Entry can have schemas associated with them. This scope
+     * allows users to attach tags to an individual column based on that schema.
+     * For attaching a tag to a nested column, use `.` to separate the column
+     * names. Example:
+     * * `outer_column.inner_column`
+     * 
+ * + * string column = 4; + * + * @return The bytes for column. + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = ""; + if (scopeCase_ == 4) { + ref = scope_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (scopeCase_ == 4) { + scope_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resources like Entry can have schemas associated with them. This scope
+     * allows users to attach tags to an individual column based on that schema.
+     * For attaching a tag to a nested column, use `.` to separate the column
+     * names. Example:
+     * * `outer_column.inner_column`
+     * 
+ * + * string column = 4; + * + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scopeCase_ = 4; + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resources like Entry can have schemas associated with them. This scope
+     * allows users to attach tags to an individual column based on that schema.
+     * For attaching a tag to a nested column, use `.` to separate the column
+     * names. Example:
+     * * `outer_column.inner_column`
+     * 
+ * + * string column = 4; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + if (scopeCase_ == 4) { + scopeCase_ = 0; + scope_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Resources like Entry can have schemas associated with them. This scope
+     * allows users to attach tags to an individual column based on that schema.
+     * For attaching a tag to a nested column, use `.` to separate the column
+     * names. Example:
+     * * `outer_column.inner_column`
+     * 
+ * + * string column = 4; + * + * @param value The bytes for column to set. + * @return This builder for chaining. + */ + public Builder setColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scopeCase_ = 4; + scope_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField + fields_; + + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + private com.google.protobuf.MapField + internalGetMutableFields() { + onChanged(); + ; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public boolean containsFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFields().getMap().containsKey(key); + } + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.Map + getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagField defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagField getFieldsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFields().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putFields(java.lang.String key, com.google.cloud.datacatalog.v1.TagField value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFields().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Required. This maps the ID of a tag field to the value of and additional information
+     * about that field. Valid field IDs are defined by the tag's template. A tag
+     * must have at least 1 field and at most 500 fields.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().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.cloud.datacatalog.v1.Tag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.Tag) + private static final com.google.cloud.datacatalog.v1.Tag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.Tag(); + } + + public static com.google.cloud.datacatalog.v1.Tag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Tag(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Tag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java new file mode 100644 index 00000000..7f2ff85d --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java @@ -0,0 +1,2489 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Contains the value and supporting information for a field within
+ * a [Tag][google.cloud.datacatalog.v1.Tag].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagField} + */ +public final class TagField extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.TagField) + TagFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use TagField.newBuilder() to construct. + private TagField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TagField() { + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TagField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TagField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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 17: + { + kindCase_ = 2; + kind_ = input.readDouble(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 3; + kind_ = s; + break; + } + case 32: + { + kindCase_ = 4; + kind_ = input.readBool(); + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (kindCase_ == 5) { + subBuilder = ((com.google.protobuf.Timestamp) kind_).toBuilder(); + } + kind_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder subBuilder = null; + if (kindCase_ == 6) { + subBuilder = + ((com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_).toBuilder(); + } + kind_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TagField.EnumValue.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 6; + break; + } + case 56: + { + order_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagField.class, + com.google.cloud.datacatalog.v1.TagField.Builder.class); + } + + public interface EnumValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.TagField.EnumValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The display name of the enum value.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * The display name of the enum value.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + } + /** + * + * + *
+   * Holds an enum value.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagField.EnumValue} + */ + public static final class EnumValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.TagField.EnumValue) + EnumValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnumValue.newBuilder() to construct. + private EnumValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnumValue() { + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnumValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnumValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagField.EnumValue.class, + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * The display name of the enum value.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+     * The display name of the enum value.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.TagField.EnumValue)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.TagField.EnumValue other = + (com.google.cloud.datacatalog.v1.TagField.EnumValue) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!unknownFields.equals(other.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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.TagField.EnumValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Holds an enum value.
+     * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagField.EnumValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.TagField.EnumValue) + com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagField.EnumValue.class, + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.TagField.EnumValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField.EnumValue getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField.EnumValue build() { + com.google.cloud.datacatalog.v1.TagField.EnumValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField.EnumValue buildPartial() { + com.google.cloud.datacatalog.v1.TagField.EnumValue result = + new com.google.cloud.datacatalog.v1.TagField.EnumValue(this); + result.displayName_ = displayName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.TagField.EnumValue) { + return mergeFrom((com.google.cloud.datacatalog.v1.TagField.EnumValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.TagField.EnumValue other) { + if (other == com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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.cloud.datacatalog.v1.TagField.EnumValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.TagField.EnumValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * The display name of the enum value.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The display name of the enum value.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The display name of the enum value.
+       * 
+ * + * 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; + } + /** + * + * + *
+       * The display name of the enum value.
+       * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The display name of the enum value.
+       * 
+ * + * 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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.TagField.EnumValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.TagField.EnumValue) + private static final com.google.cloud.datacatalog.v1.TagField.EnumValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.TagField.EnumValue(); + } + + public static com.google.cloud.datacatalog.v1.TagField.EnumValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnumValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnumValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField.EnumValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DOUBLE_VALUE(2), + STRING_VALUE(3), + BOOL_VALUE(4), + TIMESTAMP_VALUE(5), + ENUM_VALUE(6), + KIND_NOT_SET(0); + private final int value; + + private KindCase(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 KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 2: + return DOUBLE_VALUE; + case 3: + return STRING_VALUE; + case 4: + return BOOL_VALUE; + case 5: + return TIMESTAMP_VALUE; + case 6: + return ENUM_VALUE; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. The display name of this field.
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+   * Output only. The display name of this field.
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + 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 DOUBLE_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Holds the value for a tag field with double type.
+   * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (kindCase_ == 2) { + return (java.lang.Double) kind_; + } + return 0D; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Holds the value for a tag field with string type.
+   * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + 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(); + if (kindCase_ == 3) { + kind_ = s; + } + return s; + } + } + /** + * + * + *
+   * Holds the value for a tag field with string type.
+   * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Holds the value for a tag field with boolean type.
+   * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (kindCase_ == 4) { + return (java.lang.Boolean) kind_; + } + return false; + } + + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return Whether the timestampValue field is set. + */ + public boolean hasTimestampValue() { + return kindCase_ == 5; + } + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return The timestampValue. + */ + public com.google.protobuf.Timestamp getTimestampValue() { + if (kindCase_ == 5) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (kindCase_ == 5) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int ENUM_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return Whether the enumValue field is set. + */ + public boolean hasEnumValue() { + return kindCase_ == 6; + } + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return The enumValue. + */ + public com.google.cloud.datacatalog.v1.TagField.EnumValue getEnumValue() { + if (kindCase_ == 6) { + return (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_; + } + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder getEnumValueOrBuilder() { + if (kindCase_ == 6) { + return (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_; + } + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + + public static final int ORDER_FIELD_NUMBER = 7; + private int order_; + /** + * + * + *
+   * Output only. The order of this field with respect to other fields in this tag. It can be
+   * set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For
+   * example, a higher value can indicate a more important field. The value can
+   * be negative. Multiple fields can have the same order, and field orders
+   * within a tag do not have to be sequential.
+   * 
+ * + * int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The order. + */ + public int getOrder() { + return order_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (kindCase_ == 2) { + output.writeDouble(2, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); + } + if (kindCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) kind_)); + } + if (kindCase_ == 5) { + output.writeMessage(5, (com.google.protobuf.Timestamp) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_); + } + if (order_ != 0) { + output.writeInt32(7, order_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (kindCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) kind_)); + } + if (kindCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.protobuf.Timestamp) kind_); + } + if (kindCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_); + } + if (order_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, order_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.TagField)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.TagField other = (com.google.cloud.datacatalog.v1.TagField) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getOrder() != other.getOrder()) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 2: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false; + break; + case 3: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 4: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 5: + if (!getTimestampValue().equals(other.getTimestampValue())) return false; + break; + case 6: + if (!getEnumValue().equals(other.getEnumValue())) 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) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder(); + switch (kindCase_) { + case 2: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 3: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 4: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 5: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 6: + hash = (37 * hash) + ENUM_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getEnumValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.TagField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 the value and supporting information for a field within
+   * a [Tag][google.cloud.datacatalog.v1.Tag].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagField} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.TagField) + com.google.cloud.datacatalog.v1.TagFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagField.class, + com.google.cloud.datacatalog.v1.TagField.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.TagField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + order_ = 0; + + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagField_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.TagField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField build() { + com.google.cloud.datacatalog.v1.TagField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField buildPartial() { + com.google.cloud.datacatalog.v1.TagField result = + new com.google.cloud.datacatalog.v1.TagField(this); + result.displayName_ = displayName_; + if (kindCase_ == 2) { + result.kind_ = kind_; + } + if (kindCase_ == 3) { + result.kind_ = kind_; + } + if (kindCase_ == 4) { + result.kind_ = kind_; + } + if (kindCase_ == 5) { + if (timestampValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = timestampValueBuilder_.build(); + } + } + if (kindCase_ == 6) { + if (enumValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = enumValueBuilder_.build(); + } + } + result.order_ = order_; + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.TagField) { + return mergeFrom((com.google.cloud.datacatalog.v1.TagField) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.TagField other) { + if (other == com.google.cloud.datacatalog.v1.TagField.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.getOrder() != 0) { + setOrder(other.getOrder()); + } + switch (other.getKindCase()) { + case DOUBLE_VALUE: + { + setDoubleValue(other.getDoubleValue()); + break; + } + case STRING_VALUE: + { + kindCase_ = 3; + kind_ = other.kind_; + onChanged(); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case TIMESTAMP_VALUE: + { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case ENUM_VALUE: + { + mergeEnumValue(other.getEnumValue()); + break; + } + case KIND_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.cloud.datacatalog.v1.TagField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.TagField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. The display name of this field.
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The display name of this field.
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The display name of this field.
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. The display name of this field.
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of this field.
+     * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + /** + * + * + *
+     * Holds the value for a tag field with double type.
+     * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (kindCase_ == 2) { + return (java.lang.Double) kind_; + } + return 0D; + } + /** + * + * + *
+     * Holds the value for a tag field with double type.
+     * 
+ * + * double double_value = 2; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with double type.
+     * 
+ * + * double double_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Holds the value for a tag field with string type.
+     * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 3) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Holds the value for a tag field with string type.
+     * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 3) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 3) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Holds the value for a tag field with string type.
+     * 
+ * + * 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(); + } + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with string type.
+     * 
+ * + * string string_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with string type.
+     * 
+ * + * 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); + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Holds the value for a tag field with boolean type.
+     * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (kindCase_ == 4) { + return (java.lang.Boolean) kind_; + } + return false; + } + /** + * + * + *
+     * Holds the value for a tag field with boolean type.
+     * 
+ * + * bool bool_value = 4; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + kindCase_ = 4; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with boolean type.
+     * 
+ * + * bool bool_value = 4; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampValueBuilder_; + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return Whether the timestampValue field is set. + */ + public boolean hasTimestampValue() { + return kindCase_ == 5; + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return The timestampValue. + */ + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 5) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 5 && kind_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + kind_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + timestampValueBuilder_.mergeFrom(value); + } + timestampValueBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((kindCase_ == 5) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (com.google.protobuf.Timestamp) kind_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Holds the value for a tag field with timestamp type.
+     * 
+ * + * .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 (!(kindCase_ == 5)) { + kind_ = 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) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 5; + onChanged(); + ; + return timestampValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagField.EnumValue, + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder, + com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder> + enumValueBuilder_; + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return Whether the enumValue field is set. + */ + public boolean hasEnumValue() { + return kindCase_ == 6; + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return The enumValue. + */ + public com.google.cloud.datacatalog.v1.TagField.EnumValue getEnumValue() { + if (enumValueBuilder_ == null) { + if (kindCase_ == 6) { + return (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_; + } + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return enumValueBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public Builder setEnumValue(com.google.cloud.datacatalog.v1.TagField.EnumValue value) { + if (enumValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + enumValueBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public Builder setEnumValue( + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder builderForValue) { + if (enumValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + enumValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public Builder mergeEnumValue(com.google.cloud.datacatalog.v1.TagField.EnumValue value) { + if (enumValueBuilder_ == null) { + if (kindCase_ == 6 + && kind_ != com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance()) { + kind_ = + com.google.cloud.datacatalog.v1.TagField.EnumValue.newBuilder( + (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + enumValueBuilder_.mergeFrom(value); + } + enumValueBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public Builder clearEnumValue() { + if (enumValueBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + enumValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder getEnumValueBuilder() { + return getEnumValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + public com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder getEnumValueOrBuilder() { + if ((kindCase_ == 6) && (enumValueBuilder_ != null)) { + return enumValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_; + } + return com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * Holds the value for a tag field with enum type. This value must be
+     * one of the allowed values in the definition of this enum.
+     * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagField.EnumValue, + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder, + com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder> + getEnumValueFieldBuilder() { + if (enumValueBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = com.google.cloud.datacatalog.v1.TagField.EnumValue.getDefaultInstance(); + } + enumValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagField.EnumValue, + com.google.cloud.datacatalog.v1.TagField.EnumValue.Builder, + com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder>( + (com.google.cloud.datacatalog.v1.TagField.EnumValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 6; + onChanged(); + ; + return enumValueBuilder_; + } + + private int order_; + /** + * + * + *
+     * Output only. The order of this field with respect to other fields in this tag. It can be
+     * set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For
+     * example, a higher value can indicate a more important field. The value can
+     * be negative. Multiple fields can have the same order, and field orders
+     * within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The order. + */ + public int getOrder() { + return order_; + } + /** + * + * + *
+     * Output only. The order of this field with respect to other fields in this tag. It can be
+     * set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For
+     * example, a higher value can indicate a more important field. The value can
+     * be negative. Multiple fields can have the same order, and field orders
+     * within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The order to set. + * @return This builder for chaining. + */ + public Builder setOrder(int value) { + + order_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The order of this field with respect to other fields in this tag. It can be
+     * set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For
+     * example, a higher value can indicate a more important field. The value can
+     * be negative. Multiple fields can have the same order, and field orders
+     * within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOrder() { + + order_ = 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.cloud.datacatalog.v1.TagField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.TagField) + private static final com.google.cloud.datacatalog.v1.TagField DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.TagField(); + } + + public static com.google.cloud.datacatalog.v1.TagField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TagField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java new file mode 100644 index 00000000..c5690ad2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java @@ -0,0 +1,193 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public interface TagFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.TagField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The display name of this field.
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. The display name of this field.
+   * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Holds the value for a tag field with double type.
+   * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + * + * + *
+   * Holds the value for a tag field with string type.
+   * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * Holds the value for a tag field with string type.
+   * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Holds the value for a tag field with boolean type.
+   * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + /** + * + * + *
+   * Holds the value for a tag field with timestamp type.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return Whether the enumValue field is set. + */ + boolean hasEnumValue(); + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + * + * @return The enumValue. + */ + com.google.cloud.datacatalog.v1.TagField.EnumValue getEnumValue(); + /** + * + * + *
+   * Holds the value for a tag field with enum type. This value must be
+   * one of the allowed values in the definition of this enum.
+   * 
+ * + * .google.cloud.datacatalog.v1.TagField.EnumValue enum_value = 6; + */ + com.google.cloud.datacatalog.v1.TagField.EnumValueOrBuilder getEnumValueOrBuilder(); + + /** + * + * + *
+   * Output only. The order of this field with respect to other fields in this tag. It can be
+   * set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For
+   * example, a higher value can indicate a more important field. The value can
+   * be negative. Multiple fields can have the same order, and field orders
+   * within a tag do not have to be sequential.
+   * 
+ * + * int32 order = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The order. + */ + int getOrder(); + + public com.google.cloud.datacatalog.v1.TagField.KindCase getKindCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagName.java new file mode 100644 index 00000000..1d88b5c8 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagName.java @@ -0,0 +1,277 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TagName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String entryGroup; + private final String entry; + private final String tag; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public String getTag() { + return tag; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TagName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + entryGroup = Preconditions.checkNotNull(builder.getEntryGroup()); + entry = Preconditions.checkNotNull(builder.getEntry()); + tag = Preconditions.checkNotNull(builder.getTag()); + } + + public static TagName of( + String project, String location, String entryGroup, String entry, String tag) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .setTag(tag) + .build(); + } + + public static String format( + String project, String location, String entryGroup, String entry, String tag) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEntryGroup(entryGroup) + .setEntry(entry) + .setTag(tag) + .build() + .toString(); + } + + public static TagName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "TagName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("entry_group"), + matchMap.get("entry"), + matchMap.get("tag")); + } + + 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 (TagName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("entryGroup", entryGroup); + fieldMapBuilder.put("entry", entry); + fieldMapBuilder.put("tag", tag); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "entry_group", + entryGroup, + "entry", + entry, + "tag", + tag); + } + + /** Builder for TagName. */ + public static class Builder { + + private String project; + private String location; + private String entryGroup; + private String entry; + private String tag; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEntryGroup() { + return entryGroup; + } + + public String getEntry() { + return entry; + } + + public String getTag() { + return tag; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEntryGroup(String entryGroup) { + this.entryGroup = entryGroup; + return this; + } + + public Builder setEntry(String entry) { + this.entry = entry; + return this; + } + + public Builder setTag(String tag) { + this.tag = tag; + return this; + } + + private Builder() {} + + private Builder(TagName tagName) { + project = tagName.project; + location = tagName.location; + entryGroup = tagName.entryGroup; + entry = tagName.entry; + tag = tagName.tag; + } + + public TagName build() { + return new TagName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TagName) { + TagName that = (TagName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.entryGroup.equals(that.entryGroup)) + && (this.entry.equals(that.entry)) + && (this.tag.equals(that.tag)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= entryGroup.hashCode(); + h *= 1000003; + h ^= entry.hashCode(); + h *= 1000003; + h ^= tag.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java new file mode 100644 index 00000000..bc30fae9 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java @@ -0,0 +1,220 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public interface TagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.Tag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the tag in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * where `tag_id` is a system-generated identifier.
+   * Note that this Tag may not actually be stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the tag in URL format. Example:
+   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
+   * where `tag_id` is a system-generated identifier.
+   * Note that this Tag may not actually be stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The resource name of the tag template that this tag uses. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * This field cannot be modified after creation.
+   * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The template. + */ + java.lang.String getTemplate(); + /** + * + * + *
+   * Required. The resource name of the tag template that this tag uses. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * This field cannot be modified after creation.
+   * 
+ * + * string template = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for template. + */ + com.google.protobuf.ByteString getTemplateBytes(); + + /** + * + * + *
+   * Output only. The display name of the tag template.
+   * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The templateDisplayName. + */ + java.lang.String getTemplateDisplayName(); + /** + * + * + *
+   * Output only. The display name of the tag template.
+   * 
+ * + * string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for templateDisplayName. + */ + com.google.protobuf.ByteString getTemplateDisplayNameBytes(); + + /** + * + * + *
+   * Resources like Entry can have schemas associated with them. This scope
+   * allows users to attach tags to an individual column based on that schema.
+   * For attaching a tag to a nested column, use `.` to separate the column
+   * names. Example:
+   * * `outer_column.inner_column`
+   * 
+ * + * string column = 4; + * + * @return The column. + */ + java.lang.String getColumn(); + /** + * + * + *
+   * Resources like Entry can have schemas associated with them. This scope
+   * allows users to attach tags to an individual column based on that schema.
+   * For attaching a tag to a nested column, use `.` to separate the column
+   * names. Example:
+   * * `outer_column.inner_column`
+   * 
+ * + * string column = 4; + * + * @return The bytes for column. + */ + com.google.protobuf.ByteString getColumnBytes(); + + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getFieldsCount(); + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + boolean containsFields(java.lang.String key); + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getFields(); + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.Map getFieldsMap(); + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagField defaultValue); + /** + * + * + *
+   * Required. This maps the ID of a tag field to the value of and additional information
+   * about that field. Valid field IDs are defined by the tag's template. A tag
+   * must have at least 1 field and at most 500 fields.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagField getFieldsOrThrow(java.lang.String key); + + public com.google.cloud.datacatalog.v1.Tag.ScopeCase getScopeCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java new file mode 100644 index 00000000..3e50c062 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java @@ -0,0 +1,1272 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * A tag template defines a tag, which can have one or more typed fields.
+ * The template is used to create and attach the tag to GCP resources.
+ * [Tag template roles](/iam/docs/understanding-roles#data-catalog-roles)
+ * provide permissions to create, edit, and use the template. See, for example,
+ * the [TagTemplate User](/data-catalog/docs/how-to/template-user) role, which
+ * includes permission to use the tag template to tag resources.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagTemplate} + */ +public final class TagTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.TagTemplate) + TagTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use TagTemplate.newBuilder() to construct. + private TagTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TagTemplate() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TagTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TagTemplate( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = + com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + fields__ = + input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + fields_.getMutableMap().put(fields__.getKey(), fields__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagTemplate.class, + com.google.cloud.datacatalog.v1.TagTemplate.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the tag template in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * Note that this TagTemplate and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + 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 resource name of the tag template in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * Note that this TagTemplate and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + 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_; + /** + * + * + *
+   * The display name for this template. Defaults to an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+   * The display name for this template. Defaults to an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + 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 FIELDS_FIELD_NUMBER = 3; + + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + fields_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public boolean containsFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFields().getMap().containsKey(key); + } + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map + getFields() { + return getFieldsMap(); + } + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.Map + getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagTemplateField defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetFields(), FieldsDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (java.util.Map.Entry + entry : internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + fields__ = + FieldsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fields__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.TagTemplate)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.TagTemplate other = + (com.google.cloud.datacatalog.v1.TagTemplate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetFields().equals(other.internalGetFields())) return false; + if (!unknownFields.equals(other.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 (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.TagTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 tag template defines a tag, which can have one or more typed fields.
+   * The template is used to create and attach the tag to GCP resources.
+   * [Tag template roles](/iam/docs/understanding-roles#data-catalog-roles)
+   * provide permissions to create, edit, and use the template. See, for example,
+   * the [TagTemplate User](/data-catalog/docs/how-to/template-user) role, which
+   * includes permission to use the tag template to tag resources.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.TagTemplate) + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableFields(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagTemplate.class, + com.google.cloud.datacatalog.v1.TagTemplate.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.TagTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + internalGetMutableFields().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplate getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplate build() { + com.google.cloud.datacatalog.v1.TagTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplate buildPartial() { + com.google.cloud.datacatalog.v1.TagTemplate result = + new com.google.cloud.datacatalog.v1.TagTemplate(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.fields_ = internalGetFields(); + result.fields_.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.cloud.datacatalog.v1.TagTemplate) { + return mergeFrom((com.google.cloud.datacatalog.v1.TagTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.TagTemplate other) { + if (other == com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableFields().mergeFrom(other.internalGetFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.TagTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.TagTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the tag template in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * Note that this TagTemplate and its child resources may not actually be
+     * stored in the location in this 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 resource name of the tag template in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * Note that this TagTemplate and its child resources may not actually be
+     * stored in the location in this 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 resource name of the tag template in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * Note that this TagTemplate and its child resources may not actually be
+     * stored in the location in this 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 resource name of the tag template in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * Note that this TagTemplate and its child resources may not actually be
+     * stored in the location in this name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the tag template in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+     * Note that this TagTemplate and its child resources may not actually be
+     * stored in the location in this 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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name for this template. Defaults to an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The display name for this template. Defaults to an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The display name for this template. Defaults to an empty string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The display name for this template. Defaults to an empty string.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name for this template. Defaults to an empty string.
+     * 
+ * + * 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 com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + fields_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datacatalog.v1.TagTemplateField> + internalGetMutableFields() { + onChanged(); + ; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public boolean containsFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetFields().getMap().containsKey(key); + } + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map + getFields() { + return getFieldsMap(); + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.Map + getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagTemplateField defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeFields(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFields().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putFields( + java.lang.String key, com.google.cloud.datacatalog.v1.TagTemplateField value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableFields().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Required. Map of tag template field IDs to the settings for the field.
+     * This map is an exhaustive list of the allowed fields. This map must contain
+     * at least one field and at most 500 fields.
+     * The keys to this map are tag template field IDs. Field IDs can contain
+     * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+     * Field IDs must be at least 1 character long and at most
+     * 64 characters long. Field IDs must start with a letter or underscore.
+     * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().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.cloud.datacatalog.v1.TagTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.TagTemplate) + private static final com.google.cloud.datacatalog.v1.TagTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.TagTemplate(); + } + + public static com.google.cloud.datacatalog.v1.TagTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TagTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java new file mode 100644 index 00000000..19716a14 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java @@ -0,0 +1,1315 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * The template for an individual field within a tag template.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagTemplateField} + */ +public final class TagTemplateField extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.TagTemplateField) + TagTemplateFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use TagTemplateField.newBuilder() to construct. + private TagTemplateField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TagTemplateField() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TagTemplateField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TagTemplateField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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: + { + com.google.cloud.datacatalog.v1.FieldType.Builder subBuilder = null; + if (type_ != null) { + subBuilder = type_.toBuilder(); + } + type_ = + input.readMessage( + com.google.cloud.datacatalog.v1.FieldType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(type_); + type_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + isRequired_ = input.readBool(); + break; + } + case 40: + { + order_ = input.readInt32(); + break; + } + case 50: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplateField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagTemplateField.class, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the tag template field in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+   * Note that this TagTemplateField may not actually be stored in the location
+   * in this name.
+   * 
+ * + * string name = 6 [(.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) { + 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 resource name of the tag template field in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+   * Note that this TagTemplateField may not actually be stored in the location
+   * in this name.
+   * 
+ * + * string name = 6 [(.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 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 = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The display name for this field. Defaults to an empty string.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + 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; + } + } + /** + * + * + *
+   * The display name for this field. Defaults to an empty string.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + 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 TYPE_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.FieldType type_; + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return type_ != null; + } + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + public com.google.cloud.datacatalog.v1.FieldType getType() { + return type_ == null ? com.google.cloud.datacatalog.v1.FieldType.getDefaultInstance() : type_; + } + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.FieldTypeOrBuilder getTypeOrBuilder() { + return getType(); + } + + public static final int IS_REQUIRED_FIELD_NUMBER = 3; + private boolean isRequired_; + /** + * + * + *
+   * Whether this is a required field. Defaults to false.
+   * 
+ * + * bool is_required = 3; + * + * @return The isRequired. + */ + public boolean getIsRequired() { + return isRequired_; + } + + public static final int ORDER_FIELD_NUMBER = 5; + private int order_; + /** + * + * + *
+   * The order of this field with respect to other fields in this tag
+   * template. For example, a higher value can indicate a more important field.
+   * The value can be negative. Multiple fields can have the same order, and
+   * field orders within a tag do not have to be sequential.
+   * 
+ * + * int32 order = 5; + * + * @return The order. + */ + public int getOrder() { + return order_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (type_ != null) { + output.writeMessage(2, getType()); + } + if (isRequired_ != false) { + output.writeBool(3, isRequired_); + } + if (order_ != 0) { + output.writeInt32(5, order_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (type_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + if (isRequired_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isRequired_); + } + if (order_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, order_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, 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.cloud.datacatalog.v1.TagTemplateField)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.TagTemplateField other = + (com.google.cloud.datacatalog.v1.TagTemplateField) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (getIsRequired() != other.getIsRequired()) return false; + if (getOrder() != other.getOrder()) return false; + if (!unknownFields.equals(other.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 (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (37 * hash) + IS_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsRequired()); + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.TagTemplateField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 template for an individual field within a tag template.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.TagTemplateField} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.TagTemplateField) + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplateField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.TagTemplateField.class, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.TagTemplateField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + if (typeBuilder_ == null) { + type_ = null; + } else { + type_ = null; + typeBuilder_ = null; + } + isRequired_ = false; + + order_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Tags + .internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplateField getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplateField build() { + com.google.cloud.datacatalog.v1.TagTemplateField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplateField buildPartial() { + com.google.cloud.datacatalog.v1.TagTemplateField result = + new com.google.cloud.datacatalog.v1.TagTemplateField(this); + result.name_ = name_; + result.displayName_ = displayName_; + if (typeBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = typeBuilder_.build(); + } + result.isRequired_ = isRequired_; + result.order_ = order_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.TagTemplateField) { + return mergeFrom((com.google.cloud.datacatalog.v1.TagTemplateField) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.TagTemplateField other) { + if (other == com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + if (other.getIsRequired() != false) { + setIsRequired(other.getIsRequired()); + } + if (other.getOrder() != 0) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.TagTemplateField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.TagTemplateField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the tag template field in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+     * Note that this TagTemplateField may not actually be stored in the location
+     * in this name.
+     * 
+ * + * string name = 6 [(.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 resource name of the tag template field in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+     * Note that this TagTemplateField may not actually be stored in the location
+     * in this name.
+     * 
+ * + * string name = 6 [(.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 resource name of the tag template field in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+     * Note that this TagTemplateField may not actually be stored in the location
+     * in this name.
+     * 
+ * + * string name = 6 [(.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 resource name of the tag template field in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+     * Note that this TagTemplateField may not actually be stored in the location
+     * in this name.
+     * 
+ * + * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the tag template field in URL format. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+     * Note that this TagTemplateField may not actually be stored in the location
+     * in this name.
+     * 
+ * + * string name = 6 [(.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_ = ""; + /** + * + * + *
+     * The display name for this field. Defaults to an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The display name for this field. Defaults to an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The display name for this field. Defaults to an empty string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * The display name for this field. Defaults to an empty string.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name for this field. Defaults to an empty string.
+     * 
+ * + * 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 com.google.cloud.datacatalog.v1.FieldType type_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType, + com.google.cloud.datacatalog.v1.FieldType.Builder, + com.google.cloud.datacatalog.v1.FieldTypeOrBuilder> + typeBuilder_; + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return typeBuilder_ != null || type_ != null; + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + public com.google.cloud.datacatalog.v1.FieldType getType() { + if (typeBuilder_ == null) { + return type_ == null + ? com.google.cloud.datacatalog.v1.FieldType.getDefaultInstance() + : type_; + } else { + return typeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setType(com.google.cloud.datacatalog.v1.FieldType value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + typeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setType(com.google.cloud.datacatalog.v1.FieldType.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeType(com.google.cloud.datacatalog.v1.FieldType value) { + if (typeBuilder_ == null) { + if (type_ != null) { + type_ = + com.google.cloud.datacatalog.v1.FieldType.newBuilder(type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + typeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearType() { + if (typeBuilder_ == null) { + type_ = null; + onChanged(); + } else { + type_ = null; + typeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.FieldType.Builder getTypeBuilder() { + + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.FieldTypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null + ? com.google.cloud.datacatalog.v1.FieldType.getDefaultInstance() + : type_; + } + } + /** + * + * + *
+     * Required. The type of value this tag field can contain.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType, + com.google.cloud.datacatalog.v1.FieldType.Builder, + com.google.cloud.datacatalog.v1.FieldTypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.FieldType, + com.google.cloud.datacatalog.v1.FieldType.Builder, + com.google.cloud.datacatalog.v1.FieldTypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + private boolean isRequired_; + /** + * + * + *
+     * Whether this is a required field. Defaults to false.
+     * 
+ * + * bool is_required = 3; + * + * @return The isRequired. + */ + public boolean getIsRequired() { + return isRequired_; + } + /** + * + * + *
+     * Whether this is a required field. Defaults to false.
+     * 
+ * + * bool is_required = 3; + * + * @param value The isRequired to set. + * @return This builder for chaining. + */ + public Builder setIsRequired(boolean value) { + + isRequired_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this is a required field. Defaults to false.
+     * 
+ * + * bool is_required = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsRequired() { + + isRequired_ = false; + onChanged(); + return this; + } + + private int order_; + /** + * + * + *
+     * The order of this field with respect to other fields in this tag
+     * template. For example, a higher value can indicate a more important field.
+     * The value can be negative. Multiple fields can have the same order, and
+     * field orders within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 5; + * + * @return The order. + */ + public int getOrder() { + return order_; + } + /** + * + * + *
+     * The order of this field with respect to other fields in this tag
+     * template. For example, a higher value can indicate a more important field.
+     * The value can be negative. Multiple fields can have the same order, and
+     * field orders within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 5; + * + * @param value The order to set. + * @return This builder for chaining. + */ + public Builder setOrder(int value) { + + order_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The order of this field with respect to other fields in this tag
+     * template. For example, a higher value can indicate a more important field.
+     * The value can be negative. Multiple fields can have the same order, and
+     * field orders within a tag do not have to be sequential.
+     * 
+ * + * int32 order = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrder() { + + order_ = 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.cloud.datacatalog.v1.TagTemplateField) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.TagTemplateField) + private static final com.google.cloud.datacatalog.v1.TagTemplateField DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.TagTemplateField(); + } + + public static com.google.cloud.datacatalog.v1.TagTemplateField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagTemplateField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TagTemplateField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.TagTemplateField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldName.java new file mode 100644 index 00000000..db17adf8 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldName.java @@ -0,0 +1,243 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TagTemplateFieldName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String tagTemplate; + private final String field; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public String getField() { + return field; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TagTemplateFieldName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + tagTemplate = Preconditions.checkNotNull(builder.getTagTemplate()); + field = Preconditions.checkNotNull(builder.getField()); + } + + public static TagTemplateFieldName of( + String project, String location, String tagTemplate, String field) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .setField(field) + .build(); + } + + public static String format(String project, String location, String tagTemplate, String field) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .setField(field) + .build() + .toString(); + } + + public static TagTemplateFieldName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "TagTemplateFieldName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("tag_template"), + matchMap.get("field")); + } + + 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 (TagTemplateFieldName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("tagTemplate", tagTemplate); + fieldMapBuilder.put("field", field); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "tag_template", tagTemplate, "field", field); + } + + /** Builder for TagTemplateFieldName. */ + public static class Builder { + + private String project; + private String location; + private String tagTemplate; + private String field; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public String getField() { + return field; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTagTemplate(String tagTemplate) { + this.tagTemplate = tagTemplate; + return this; + } + + public Builder setField(String field) { + this.field = field; + return this; + } + + private Builder() {} + + private Builder(TagTemplateFieldName tagTemplateFieldName) { + project = tagTemplateFieldName.project; + location = tagTemplateFieldName.location; + tagTemplate = tagTemplateFieldName.tagTemplate; + field = tagTemplateFieldName.field; + } + + public TagTemplateFieldName build() { + return new TagTemplateFieldName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TagTemplateFieldName) { + TagTemplateFieldName that = (TagTemplateFieldName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.tagTemplate.equals(that.tagTemplate)) + && (this.field.equals(that.field)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= tagTemplate.hashCode(); + h *= 1000003; + h ^= field.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java new file mode 100644 index 00000000..9346f8bc --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java @@ -0,0 +1,151 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public interface TagTemplateFieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.TagTemplateField) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the tag template field in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+   * Note that this TagTemplateField may not actually be stored in the location
+   * in this name.
+   * 
+ * + * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the tag template field in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
+   * Note that this TagTemplateField may not actually be stored in the location
+   * in this name.
+   * 
+ * + * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The display name for this field. Defaults to an empty string.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name for this field. Defaults to an empty string.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.datacatalog.v1.FieldType getType(); + /** + * + * + *
+   * Required. The type of value this tag field can contain.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.FieldType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.FieldTypeOrBuilder getTypeOrBuilder(); + + /** + * + * + *
+   * Whether this is a required field. Defaults to false.
+   * 
+ * + * bool is_required = 3; + * + * @return The isRequired. + */ + boolean getIsRequired(); + + /** + * + * + *
+   * The order of this field with respect to other fields in this tag
+   * template. For example, a higher value can indicate a more important field.
+   * The value can be negative. Multiple fields can have the same order, and
+   * field orders within a tag do not have to be sequential.
+   * 
+ * + * int32 order = 5; + * + * @return The order. + */ + int getOrder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateName.java new file mode 100644 index 00000000..00eb5fcc --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateName.java @@ -0,0 +1,215 @@ +/* + * 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. + */ + +package com.google.cloud.datacatalog.v1; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TagTemplateName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/tagTemplates/{tag_template}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String tagTemplate; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TagTemplateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + tagTemplate = Preconditions.checkNotNull(builder.getTagTemplate()); + } + + public static TagTemplateName of(String project, String location, String tagTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .build(); + } + + public static String format(String project, String location, String tagTemplate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .build() + .toString(); + } + + public static TagTemplateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "TagTemplateName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("tag_template")); + } + + 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 (TagTemplateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("tagTemplate", tagTemplate); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "tag_template", tagTemplate); + } + + /** Builder for TagTemplateName. */ + public static class Builder { + + private String project; + private String location; + private String tagTemplate; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTagTemplate(String tagTemplate) { + this.tagTemplate = tagTemplate; + return this; + } + + private Builder() {} + + private Builder(TagTemplateName tagTemplateName) { + project = tagTemplateName.project; + location = tagTemplateName.location; + tagTemplate = tagTemplateName.tagTemplate; + } + + public TagTemplateName build() { + return new TagTemplateName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TagTemplateName) { + TagTemplateName that = (TagTemplateName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.tagTemplate.equals(that.tagTemplate)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= tagTemplate.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java new file mode 100644 index 00000000..4917d039 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java @@ -0,0 +1,176 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public interface TagTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.TagTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the tag template in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * Note that this TagTemplate and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the tag template in URL format. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
+   * Note that this TagTemplate and its child resources may not actually be
+   * stored in the location in this name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The display name for this template. Defaults to an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name for this template. Defaults to an empty string.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getFieldsCount(); + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + boolean containsFields(java.lang.String key); + /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getFields(); + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.Map getFieldsMap(); + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrDefault( + java.lang.String key, com.google.cloud.datacatalog.v1.TagTemplateField defaultValue); + /** + * + * + *
+   * Required. Map of tag template field IDs to the settings for the field.
+   * This map is an exhaustive list of the allowed fields. This map must contain
+   * at least one field and at most 500 fields.
+   * The keys to this map are tag template field IDs. Field IDs can contain
+   * letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
+   * Field IDs must be at least 1 character long and at most
+   * 64 characters long. Field IDs must start with a letter or underscore.
+   * 
+ * + * + * map<string, .google.cloud.datacatalog.v1.TagTemplateField> fields = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateField getFieldsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java new file mode 100644 index 00000000..59cc366d --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java @@ -0,0 +1,240 @@ +/* + * 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/cloud/datacatalog/v1/tags.proto + +package com.google.cloud.datacatalog.v1; + +public final class Tags { + private Tags() {} + + 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_cloud_datacatalog_v1_Tag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_Tag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TagField_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TagField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TagTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_TagTemplateField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_FieldType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_FieldType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_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/cloud/datacatalog/v1/tags.proto" + + "\022\033google.cloud.datacatalog.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032\037google/protobuf/timestamp.pro" + + "to\"\206\003\n\003Tag\022\014\n\004name\030\001 \001(\t\022\025\n\010template\030\002 \001" + + "(\tB\003\340A\002\022\"\n\025template_display_name\030\005 \001(\tB\003" + + "\340A\003\022\020\n\006column\030\004 \001(\tH\000\022A\n\006fields\030\003 \003(\0132,." + + "google.cloud.datacatalog.v1.Tag.FieldsEn" + + "tryB\003\340A\002\032T\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\0224\n\005" + + "value\030\002 \001(\0132%.google.cloud.datacatalog.v" + + "1.TagField:\0028\001:\201\001\352A~\n\036datacatalog.google" + + "apis.com/Tag\022\\projects/{project}/locatio" + + "ns/{location}/entryGroups/{entry_group}/" + + "entries/{entry}/tags/{tag}B\007\n\005scope\"\250\002\n\010" + + "TagField\022\031\n\014display_name\030\001 \001(\tB\003\340A\003\022\026\n\014d" + + "ouble_value\030\002 \001(\001H\000\022\026\n\014string_value\030\003 \001(" + + "\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\0225\n\017timestamp_v" + + "alue\030\005 \001(\0132\032.google.protobuf.TimestampH\000" + + "\022E\n\nenum_value\030\006 \001(\0132/.google.cloud.data" + + "catalog.v1.TagField.EnumValueH\000\022\022\n\005order" + + "\030\007 \001(\005B\003\340A\003\032!\n\tEnumValue\022\024\n\014display_name" + + "\030\001 \001(\tB\006\n\004kind\"\314\002\n\013TagTemplate\022\014\n\004name\030\001" + + " \001(\t\022\024\n\014display_name\030\002 \001(\t\022I\n\006fields\030\003 \003" + + "(\01324.google.cloud.datacatalog.v1.TagTemp" + + "late.FieldsEntryB\003\340A\002\032\\\n\013FieldsEntry\022\013\n\003" + + "key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google.cloud." + + "datacatalog.v1.TagTemplateField:\0028\001:p\352Am" + + "\n&datacatalog.googleapis.com/TagTemplate" + + "\022Cprojects/{project}/locations/{location" + + "}/tagTemplates/{tag_template}\"\242\002\n\020TagTem" + + "plateField\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\024\n\014display" + + "_name\030\001 \001(\t\0229\n\004type\030\002 \001(\0132&.google.cloud" + + ".datacatalog.v1.FieldTypeB\003\340A\002\022\023\n\013is_req" + + "uired\030\003 \001(\010\022\r\n\005order\030\005 \001(\005:\205\001\352A\201\001\n+datac" + + "atalog.googleapis.com/TagTemplateField\022R" + + "projects/{project}/locations/{location}/" + + "tagTemplates/{tag_template}/fields/{fiel" + + "d}\"\230\003\n\tFieldType\022N\n\016primitive_type\030\001 \001(\016" + + "24.google.cloud.datacatalog.v1.FieldType" + + ".PrimitiveTypeH\000\022D\n\tenum_type\030\002 \001(\0132/.go" + + "ogle.cloud.datacatalog.v1.FieldType.Enum" + + "TypeH\000\032\205\001\n\010EnumType\022Q\n\016allowed_values\030\001 " + + "\003(\01329.google.cloud.datacatalog.v1.FieldT" + + "ype.EnumType.EnumValue\032&\n\tEnumValue\022\031\n\014d" + + "isplay_name\030\001 \001(\tB\003\340A\002\"`\n\rPrimitiveType\022" + + "\036\n\032PRIMITIVE_TYPE_UNSPECIFIED\020\000\022\n\n\006DOUBL" + + "E\020\001\022\n\n\006STRING\020\002\022\010\n\004BOOL\020\003\022\r\n\tTIMESTAMP\020\004" + + "B\013\n\ttype_declBn\n\037com.google.cloud.dataca" + + "talog.v1P\001ZFgoogle.golang.org/genproto/g" + + "oogleapis/cloud/datacatalog/v1;datacatal" + + "og\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_Tag_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_Tag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_Tag_descriptor, + new java.lang.String[] { + "Name", "Template", "TemplateDisplayName", "Column", "Fields", "Scope", + }); + internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_descriptor = + internal_static_google_cloud_datacatalog_v1_Tag_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_Tag_FieldsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datacatalog_v1_TagField_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_TagField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TagField_descriptor, + new java.lang.String[] { + "DisplayName", + "DoubleValue", + "StringValue", + "BoolValue", + "TimestampValue", + "EnumValue", + "Order", + "Kind", + }); + internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor = + internal_static_google_cloud_datacatalog_v1_TagField_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TagField_EnumValue_descriptor, + new java.lang.String[] { + "DisplayName", + }); + internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datacatalog_v1_TagTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Fields", + }); + internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_descriptor = + internal_static_google_cloud_datacatalog_v1_TagTemplate_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TagTemplate_FieldsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datacatalog_v1_TagTemplateField_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Type", "IsRequired", "Order", + }); + internal_static_google_cloud_datacatalog_v1_FieldType_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datacatalog_v1_FieldType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_FieldType_descriptor, + new java.lang.String[] { + "PrimitiveType", "EnumType", "TypeDecl", + }); + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor = + internal_static_google_cloud_datacatalog_v1_FieldType_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor, + new java.lang.String[] { + "AllowedValues", + }); + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor = + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_FieldType_EnumType_EnumValue_descriptor, + new java.lang.String[] { + "DisplayName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Timestamps.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Timestamps.java new file mode 100644 index 00000000..8ce1fd49 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Timestamps.java @@ -0,0 +1,80 @@ +/* + * 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/cloud/datacatalog/v1/timestamps.proto + +package com.google.cloud.datacatalog.v1; + +public final class Timestamps { + private Timestamps() {} + + 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_cloud_datacatalog_v1_SystemTimestamps_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SystemTimestamps_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/cloud/datacatalog/v1/timestamps" + + ".proto\022\033google.cloud.datacatalog.v1\032\037goo" + + "gle/api/field_behavior.proto\032\037google/pro" + + "tobuf/timestamp.proto\"\252\001\n\020SystemTimestam" + + "ps\022/\n\013create_time\030\001 \001(\0132\032.google.protobu" + + "f.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.googl" + + "e.protobuf.Timestamp\0224\n\013expire_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003Bn\n\037co" + + "m.google.cloud.datacatalog.v1P\001ZFgoogle." + + "golang.org/genproto/googleapis/cloud/dat" + + "acatalog/v1;datacatalog\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_SystemTimestamps_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_SystemTimestamps_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SystemTimestamps_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "ExpireTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java new file mode 100644 index 00000000..af6dd567 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java @@ -0,0 +1,1039 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateEntryGroupRequest} + */ +public final class UpdateEntryGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateEntryGroupRequest) + UpdateEntryGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateEntryGroupRequest.newBuilder() to construct. + private UpdateEntryGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateEntryGroupRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateEntryGroupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateEntryGroupRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.EntryGroup.Builder subBuilder = null; + if (entryGroup_ != null) { + subBuilder = entryGroup_.toBuilder(); + } + entryGroup_ = + input.readMessage( + com.google.cloud.datacatalog.v1.EntryGroup.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entryGroup_); + entryGroup_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.Builder.class); + } + + public static final int ENTRY_GROUP_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.EntryGroup entryGroup_; + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entryGroup field is set. + */ + public boolean hasEntryGroup() { + return entryGroup_ != null; + } + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entryGroup. + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup() { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder() { + return getEntryGroup(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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 (entryGroup_ != null) { + output.writeMessage(1, getEntryGroup()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entryGroup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntryGroup()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.cloud.datacatalog.v1.UpdateEntryGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest other = + (com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest) obj; + + if (hasEntryGroup() != other.hasEntryGroup()) return false; + if (hasEntryGroup()) { + if (!getEntryGroup().equals(other.getEntryGroup())) 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(); + if (hasEntryGroup()) { + hash = (37 * hash) + ENTRY_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getEntryGroup().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.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateEntryGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateEntryGroupRequest) + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.class, + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (entryGroupBuilder_ == null) { + entryGroup_ = null; + } else { + entryGroup_ = null; + entryGroupBuilder_ = 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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest build() { + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest result = + new com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest(this); + if (entryGroupBuilder_ == null) { + result.entryGroup_ = entryGroup_; + } else { + result.entryGroup_ = entryGroupBuilder_.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.cloud.datacatalog.v1.UpdateEntryGroupRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest.getDefaultInstance()) + return this; + if (other.hasEntryGroup()) { + mergeEntryGroup(other.getEntryGroup()); + } + 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.cloud.datacatalog.v1.UpdateEntryGroupRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.EntryGroup entryGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + entryGroupBuilder_; + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entryGroup field is set. + */ + public boolean hasEntryGroup() { + return entryGroupBuilder_ != null || entryGroup_ != null; + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entryGroup. + */ + public com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup() { + if (entryGroupBuilder_ == null) { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } else { + return entryGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntryGroup(com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entryGroup_ = value; + onChanged(); + } else { + entryGroupBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntryGroup( + com.google.cloud.datacatalog.v1.EntryGroup.Builder builderForValue) { + if (entryGroupBuilder_ == null) { + entryGroup_ = builderForValue.build(); + onChanged(); + } else { + entryGroupBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEntryGroup(com.google.cloud.datacatalog.v1.EntryGroup value) { + if (entryGroupBuilder_ == null) { + if (entryGroup_ != null) { + entryGroup_ = + com.google.cloud.datacatalog.v1.EntryGroup.newBuilder(entryGroup_) + .mergeFrom(value) + .buildPartial(); + } else { + entryGroup_ = value; + } + onChanged(); + } else { + entryGroupBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntryGroup() { + if (entryGroupBuilder_ == null) { + entryGroup_ = null; + onChanged(); + } else { + entryGroup_ = null; + entryGroupBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryGroup.Builder getEntryGroupBuilder() { + + onChanged(); + return getEntryGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder() { + if (entryGroupBuilder_ != null) { + return entryGroupBuilder_.getMessageOrBuilder(); + } else { + return entryGroup_ == null + ? com.google.cloud.datacatalog.v1.EntryGroup.getDefaultInstance() + : entryGroup_; + } + } + /** + * + * + *
+     * Required. The updated entry group. "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder> + getEntryGroupFieldBuilder() { + if (entryGroupBuilder_ == null) { + entryGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.EntryGroup, + com.google.cloud.datacatalog.v1.EntryGroup.Builder, + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder>( + getEntryGroup(), getParentForChildren(), isClean()); + entryGroup_ = null; + } + return entryGroupBuilder_; + } + + 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_; + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The fields to update on the entry group. If absent or empty, all modifiable
+     * fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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.cloud.datacatalog.v1.UpdateEntryGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateEntryGroupRequest) + private static final com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEntryGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateEntryGroupRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java new file mode 100644 index 00000000..2f94e45f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateEntryGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateEntryGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entryGroup field is set. + */ + boolean hasEntryGroup(); + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entryGroup. + */ + com.google.cloud.datacatalog.v1.EntryGroup getEntryGroup(); + /** + * + * + *
+   * Required. The updated entry group. "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilder(); + + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The fields to update on the entry group. If absent or empty, all modifiable
+   * fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java new file mode 100644 index 00000000..f25b684c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java @@ -0,0 +1,1223 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateEntryRequest} + */ +public final class UpdateEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateEntryRequest) + UpdateEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateEntryRequest.newBuilder() to construct. + private UpdateEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateEntryRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.Entry.Builder subBuilder = null; + if (entry_ != null) { + subBuilder = entry_.toBuilder(); + } + entry_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Entry.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entry_); + entry_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateEntryRequest.class, + com.google.cloud.datacatalog.v1.UpdateEntryRequest.Builder.class); + } + + public static final int ENTRY_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.Entry entry_; + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + public boolean hasEntry() { + return entry_ != null; + } + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + public com.google.cloud.datacatalog.v1.Entry getEntry() { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { + return getEntry(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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 (entry_ != null) { + output.writeMessage(1, getEntry()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entry_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntry()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.cloud.datacatalog.v1.UpdateEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateEntryRequest other = + (com.google.cloud.datacatalog.v1.UpdateEntryRequest) obj; + + if (hasEntry() != other.hasEntry()) return false; + if (hasEntry()) { + if (!getEntry().equals(other.getEntry())) 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(); + if (hasEntry()) { + hash = (37 * hash) + ENTRY_FIELD_NUMBER; + hash = (53 * hash) + getEntry().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.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.UpdateEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateEntryRequest) + com.google.cloud.datacatalog.v1.UpdateEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateEntryRequest.class, + com.google.cloud.datacatalog.v1.UpdateEntryRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateEntryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (entryBuilder_ == null) { + entry_ = null; + } else { + entry_ = null; + entryBuilder_ = 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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateEntryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryRequest build() { + com.google.cloud.datacatalog.v1.UpdateEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateEntryRequest result = + new com.google.cloud.datacatalog.v1.UpdateEntryRequest(this); + if (entryBuilder_ == null) { + result.entry_ = entry_; + } else { + result.entry_ = entryBuilder_.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.cloud.datacatalog.v1.UpdateEntryRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateEntryRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdateEntryRequest.getDefaultInstance()) + return this; + if (other.hasEntry()) { + mergeEntry(other.getEntry()); + } + 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.cloud.datacatalog.v1.UpdateEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdateEntryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.Entry entry_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + entryBuilder_; + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + public boolean hasEntry() { + return entryBuilder_ != null || entry_ != null; + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + public com.google.cloud.datacatalog.v1.Entry getEntry() { + if (entryBuilder_ == null) { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } else { + return entryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntry(com.google.cloud.datacatalog.v1.Entry value) { + if (entryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entry_ = value; + onChanged(); + } else { + entryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntry(com.google.cloud.datacatalog.v1.Entry.Builder builderForValue) { + if (entryBuilder_ == null) { + entry_ = builderForValue.build(); + onChanged(); + } else { + entryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEntry(com.google.cloud.datacatalog.v1.Entry value) { + if (entryBuilder_ == null) { + if (entry_ != null) { + entry_ = + com.google.cloud.datacatalog.v1.Entry.newBuilder(entry_) + .mergeFrom(value) + .buildPartial(); + } else { + entry_ = value; + } + onChanged(); + } else { + entryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntry() { + if (entryBuilder_ == null) { + entry_ = null; + onChanged(); + } else { + entry_ = null; + entryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.Entry.Builder getEntryBuilder() { + + onChanged(); + return getEntryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { + if (entryBuilder_ != null) { + return entryBuilder_.getMessageOrBuilder(); + } else { + return entry_ == null ? com.google.cloud.datacatalog.v1.Entry.getDefaultInstance() : entry_; + } + } + /** + * + * + *
+     * Required. The updated entry. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder> + getEntryFieldBuilder() { + if (entryBuilder_ == null) { + entryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Entry, + com.google.cloud.datacatalog.v1.Entry.Builder, + com.google.cloud.datacatalog.v1.EntryOrBuilder>( + getEntry(), getParentForChildren(), isClean()); + entry_ = null; + } + return entryBuilder_; + } + + 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_; + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The fields to update on the entry. If absent or empty, all modifiable
+     * fields are updated.
+     * The following fields are modifiable:
+     * * For entries with type `DATA_STREAM`:
+     *    * `schema`
+     * * For entries with type `FILESET`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * `gcs_fileset_spec`
+     *    * `gcs_fileset_spec.file_patterns`
+     * * For entries with `user_specified_type`
+     *    * `schema`
+     *    * `display_name`
+     *    * `description`
+     *    * user_specified_type
+     *    * user_specified_system
+     *    * linked_resource
+     *    * source_system_timestamps
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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.cloud.datacatalog.v1.UpdateEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateEntryRequest) + private static final com.google.cloud.datacatalog.v1.UpdateEntryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateEntryRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateEntryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateEntryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java new file mode 100644 index 00000000..7dc726c2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entry field is set. + */ + boolean hasEntry(); + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entry. + */ + com.google.cloud.datacatalog.v1.Entry getEntry(); + /** + * + * + *
+   * Required. The updated entry. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder(); + + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The fields to update on the entry. If absent or empty, all modifiable
+   * fields are updated.
+   * The following fields are modifiable:
+   * * For entries with type `DATA_STREAM`:
+   *    * `schema`
+   * * For entries with type `FILESET`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * `gcs_fileset_spec`
+   *    * `gcs_fileset_spec.file_patterns`
+   * * For entries with `user_specified_type`
+   *    * `schema`
+   *    * `display_name`
+   *    * `description`
+   *    * user_specified_type
+   *    * user_specified_system
+   *    * linked_resource
+   *    * source_system_timestamps
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java new file mode 100644 index 00000000..fb46238c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java @@ -0,0 +1,1016 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagRequest} + */ +public final class UpdateTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateTagRequest) + UpdateTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTagRequest.newBuilder() to construct. + private UpdateTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTagRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.Tag.Builder subBuilder = null; + if (tag_ != null) { + subBuilder = tag_.toBuilder(); + } + tag_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Tag.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tag_); + tag_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagRequest.Builder.class); + } + + public static final int TAG_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.Tag tag_; + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + public boolean hasTag() { + return tag_ != null; + } + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + public com.google.cloud.datacatalog.v1.Tag getTag() { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { + return getTag(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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 (tag_ != null) { + output.writeMessage(1, getTag()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTag()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.cloud.datacatalog.v1.UpdateTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateTagRequest other = + (com.google.cloud.datacatalog.v1.UpdateTagRequest) obj; + + if (hasTag() != other.hasTag()) return false; + if (hasTag()) { + if (!getTag().equals(other.getTag())) 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(); + if (hasTag()) { + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().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.cloud.datacatalog.v1.UpdateTagRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.UpdateTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateTagRequest) + com.google.cloud.datacatalog.v1.UpdateTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (tagBuilder_ == null) { + tag_ = null; + } else { + tag_ = null; + tagBuilder_ = 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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagRequest build() { + com.google.cloud.datacatalog.v1.UpdateTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateTagRequest result = + new com.google.cloud.datacatalog.v1.UpdateTagRequest(this); + if (tagBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = tagBuilder_.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.cloud.datacatalog.v1.UpdateTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdateTagRequest.getDefaultInstance()) + return this; + if (other.hasTag()) { + mergeTag(other.getTag()); + } + 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.cloud.datacatalog.v1.UpdateTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.UpdateTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.Tag tag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + tagBuilder_; + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + public boolean hasTag() { + return tagBuilder_ != null || tag_ != null; + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + public com.google.cloud.datacatalog.v1.Tag getTag() { + if (tagBuilder_ == null) { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } else { + return tagBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTag(com.google.cloud.datacatalog.v1.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + tagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTag(com.google.cloud.datacatalog.v1.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + tagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTag(com.google.cloud.datacatalog.v1.Tag value) { + if (tagBuilder_ == null) { + if (tag_ != null) { + tag_ = + com.google.cloud.datacatalog.v1.Tag.newBuilder(tag_).mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + tagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTag() { + if (tagBuilder_ == null) { + tag_ = null; + onChanged(); + } else { + tag_ = null; + tagBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.Tag.Builder getTagBuilder() { + + onChanged(); + return getTagFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { + if (tagBuilder_ != null) { + return tagBuilder_.getMessageOrBuilder(); + } else { + return tag_ == null ? com.google.cloud.datacatalog.v1.Tag.getDefaultInstance() : tag_; + } + } + /** + * + * + *
+     * Required. The updated tag. The "name" field must be set.
+     * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder> + getTagFieldBuilder() { + if (tagBuilder_ == null) { + tagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Tag, + com.google.cloud.datacatalog.v1.Tag.Builder, + com.google.cloud.datacatalog.v1.TagOrBuilder>( + getTag(), getParentForChildren(), isClean()); + tag_ = null; + } + return tagBuilder_; + } + + 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_; + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The fields to update on the Tag. If absent or empty, all modifiable fields
+     * are updated. Currently the only modifiable field is the field `fields`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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.cloud.datacatalog.v1.UpdateTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateTagRequest) + private static final com.google.cloud.datacatalog.v1.UpdateTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java new file mode 100644 index 00000000..88f69acf --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tag field is set. + */ + boolean hasTag(); + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tag. + */ + com.google.cloud.datacatalog.v1.Tag getTag(); + /** + * + * + *
+   * Required. The updated tag. The "name" field must be set.
+   * 
+ * + * .google.cloud.datacatalog.v1.Tag tag = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder(); + + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The fields to update on the Tag. If absent or empty, all modifiable fields
+   * are updated. Currently the only modifiable field is the field `fields`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java new file mode 100644 index 00000000..e2323933 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java @@ -0,0 +1,1363 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} + */ +public final class UpdateTagTemplateFieldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + UpdateTagTemplateFieldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTagTemplateFieldRequest.newBuilder() to construct. + private UpdateTagTemplateFieldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTagTemplateFieldRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTagTemplateFieldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTagTemplateFieldRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.TagTemplateField.Builder subBuilder = null; + if (tagTemplateField_ != null) { + subBuilder = tagTemplateField_.toBuilder(); + } + tagTemplateField_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TagTemplateField.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tagTemplateField_); + tagTemplateField_ = 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the tag template field. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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) { + 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 tag template field. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * 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 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 TAG_TEMPLATE_FIELD_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.TagTemplateField tagTemplateField_; + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + public boolean hasTagTemplateField() { + return tagTemplateField_ != null; + } + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField() { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder getTagTemplateFieldOrBuilder() { + return getTagTemplateField(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (tagTemplateField_ != null) { + output.writeMessage(2, getTagTemplateField()); + } + 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 (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (tagTemplateField_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTagTemplateField()); + } + 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.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest other = + (com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasTagTemplateField() != other.hasTagTemplateField()) return false; + if (hasTagTemplateField()) { + if (!getTagTemplateField().equals(other.getTagTemplateField())) 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 (hasTagTemplateField()) { + hash = (37 * hash) + TAG_TEMPLATE_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplateField().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.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = null; + } else { + tagTemplateField_ = null; + tagTemplateFieldBuilder_ = 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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest build() { + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest result = + new com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest(this); + result.name_ = name_; + if (tagTemplateFieldBuilder_ == null) { + result.tagTemplateField_ = tagTemplateField_; + } else { + result.tagTemplateField_ = tagTemplateFieldBuilder_.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.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest other) { + if (other + == com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasTagTemplateField()) { + mergeTagTemplateField(other.getTagTemplateField()); + } + 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.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the tag template field. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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 tag template field. Example:
+     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+     * 
+ * + * + * 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.cloud.datacatalog.v1.TagTemplateField tagTemplateField_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder> + tagTemplateFieldBuilder_; + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + public boolean hasTagTemplateField() { + return tagTemplateFieldBuilder_ != null || tagTemplateField_ != null; + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + public com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField() { + if (tagTemplateFieldBuilder_ == null) { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } else { + return tagTemplateFieldBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplateField(com.google.cloud.datacatalog.v1.TagTemplateField value) { + if (tagTemplateFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tagTemplateField_ = value; + onChanged(); + } else { + tagTemplateFieldBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplateField( + com.google.cloud.datacatalog.v1.TagTemplateField.Builder builderForValue) { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = builderForValue.build(); + onChanged(); + } else { + tagTemplateFieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTagTemplateField(com.google.cloud.datacatalog.v1.TagTemplateField value) { + if (tagTemplateFieldBuilder_ == null) { + if (tagTemplateField_ != null) { + tagTemplateField_ = + com.google.cloud.datacatalog.v1.TagTemplateField.newBuilder(tagTemplateField_) + .mergeFrom(value) + .buildPartial(); + } else { + tagTemplateField_ = value; + } + onChanged(); + } else { + tagTemplateFieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTagTemplateField() { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateField_ = null; + onChanged(); + } else { + tagTemplateField_ = null; + tagTemplateFieldBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateField.Builder getTagTemplateFieldBuilder() { + + onChanged(); + return getTagTemplateFieldFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder + getTagTemplateFieldOrBuilder() { + if (tagTemplateFieldBuilder_ != null) { + return tagTemplateFieldBuilder_.getMessageOrBuilder(); + } else { + return tagTemplateField_ == null + ? com.google.cloud.datacatalog.v1.TagTemplateField.getDefaultInstance() + : tagTemplateField_; + } + } + /** + * + * + *
+     * Required. The template to update.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder> + getTagTemplateFieldFieldBuilder() { + if (tagTemplateFieldBuilder_ == null) { + tagTemplateFieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplateField, + com.google.cloud.datacatalog.v1.TagTemplateField.Builder, + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder>( + getTagTemplateField(), getParentForChildren(), isClean()); + tagTemplateField_ = null; + } + return tagTemplateFieldBuilder_; + } + + 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_; + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. The field mask specifies the parts of the template to be updated.
+     * Allowed fields:
+     *   * `display_name`
+     *   * `type.enum_type`
+     *   * `is_required`
+     * If `update_mask` is not set or empty, all of the allowed fields above will
+     * be updated.
+     * When updating an enum type, the provided values will be merged with the
+     * existing values. Therefore, enum values can only be added, existing enum
+     * values cannot be deleted nor renamed. Updating a template field from
+     * optional to required is NOT allowed.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + private static final com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTagTemplateFieldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTagTemplateFieldRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java new file mode 100644 index 00000000..86a58bc4 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java @@ -0,0 +1,165 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateTagTemplateFieldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the tag template field. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the tag template field. Example:
+   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplateField field is set. + */ + boolean hasTagTemplateField(); + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplateField. + */ + com.google.cloud.datacatalog.v1.TagTemplateField getTagTemplateField(); + /** + * + * + *
+   * Required. The template to update.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplateField tag_template_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder getTagTemplateFieldOrBuilder(); + + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The field mask specifies the parts of the template to be updated.
+   * Allowed fields:
+   *   * `display_name`
+   *   * `type.enum_type`
+   *   * `is_required`
+   * If `update_mask` is not set or empty, all of the allowed fields above will
+   * be updated.
+   * When updating an enum type, the provided values will be merged with the
+   * existing values. Therefore, enum values can only be added, existing enum
+   * values cannot be deleted nor renamed. Updating a template field from
+   * optional to required is NOT allowed.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java new file mode 100644 index 00000000..2e298d38 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java @@ -0,0 +1,1063 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Request message for
+ * [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate].
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagTemplateRequest} + */ +public final class UpdateTagTemplateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateTagTemplateRequest) + UpdateTagTemplateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTagTemplateRequest.newBuilder() to construct. + private UpdateTagTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTagTemplateRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTagTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTagTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.cloud.datacatalog.v1.TagTemplate.Builder subBuilder = null; + if (tagTemplate_ != null) { + subBuilder = tagTemplate_.toBuilder(); + } + tagTemplate_ = + input.readMessage( + com.google.cloud.datacatalog.v1.TagTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tagTemplate_); + tagTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + 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 (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.Builder.class); + } + + public static final int TAG_TEMPLATE_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.TagTemplate tagTemplate_; + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + public boolean hasTagTemplate() { + return tagTemplate_ != null; + } + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + public com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate() { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder() { + return getTagTemplate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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 (tagTemplate_ != null) { + output.writeMessage(1, getTagTemplate()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tagTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTagTemplate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.cloud.datacatalog.v1.UpdateTagTemplateRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest other = + (com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest) obj; + + if (hasTagTemplate() != other.hasTagTemplate()) return false; + if (hasTagTemplate()) { + if (!getTagTemplate().equals(other.getTagTemplate())) 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(); + if (hasTagTemplate()) { + hash = (37 * hash) + TAG_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getTagTemplate().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.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate].
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTagTemplateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateTagTemplateRequest) + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.class, + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (tagTemplateBuilder_ == null) { + tagTemplate_ = null; + } else { + tagTemplate_ = null; + tagTemplateBuilder_ = 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.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest build() { + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest result = + new com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest(this); + if (tagTemplateBuilder_ == null) { + result.tagTemplate_ = tagTemplate_; + } else { + result.tagTemplate_ = tagTemplateBuilder_.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.cloud.datacatalog.v1.UpdateTagTemplateRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest.getDefaultInstance()) + return this; + if (other.hasTagTemplate()) { + mergeTagTemplate(other.getTagTemplate()); + } + 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.cloud.datacatalog.v1.UpdateTagTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.TagTemplate tagTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder> + tagTemplateBuilder_; + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + public boolean hasTagTemplate() { + return tagTemplateBuilder_ != null || tagTemplate_ != null; + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + public com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate() { + if (tagTemplateBuilder_ == null) { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } else { + return tagTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplate(com.google.cloud.datacatalog.v1.TagTemplate value) { + if (tagTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tagTemplate_ = value; + onChanged(); + } else { + tagTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagTemplate( + com.google.cloud.datacatalog.v1.TagTemplate.Builder builderForValue) { + if (tagTemplateBuilder_ == null) { + tagTemplate_ = builderForValue.build(); + onChanged(); + } else { + tagTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTagTemplate(com.google.cloud.datacatalog.v1.TagTemplate value) { + if (tagTemplateBuilder_ == null) { + if (tagTemplate_ != null) { + tagTemplate_ = + com.google.cloud.datacatalog.v1.TagTemplate.newBuilder(tagTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + tagTemplate_ = value; + } + onChanged(); + } else { + tagTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTagTemplate() { + if (tagTemplateBuilder_ == null) { + tagTemplate_ = null; + onChanged(); + } else { + tagTemplate_ = null; + tagTemplateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplate.Builder getTagTemplateBuilder() { + + onChanged(); + return getTagTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder() { + if (tagTemplateBuilder_ != null) { + return tagTemplateBuilder_.getMessageOrBuilder(); + } else { + return tagTemplate_ == null + ? com.google.cloud.datacatalog.v1.TagTemplate.getDefaultInstance() + : tagTemplate_; + } + } + /** + * + * + *
+     * Required. The template to update. The "name" field must be set.
+     * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder> + getTagTemplateFieldBuilder() { + if (tagTemplateBuilder_ == null) { + tagTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.TagTemplate, + com.google.cloud.datacatalog.v1.TagTemplate.Builder, + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder>( + getTagTemplate(), getParentForChildren(), isClean()); + tagTemplate_ = null; + } + return tagTemplateBuilder_; + } + + 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_; + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The field mask specifies the parts of the template to overwrite.
+     * Allowed fields:
+     *   * `display_name`
+     * If absent or empty, all of the allowed fields above will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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.cloud.datacatalog.v1.UpdateTagTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateTagTemplateRequest) + private static final com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTagTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTagTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTagTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java new file mode 100644 index 00000000..4dff865c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateTagTemplateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateTagTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagTemplate field is set. + */ + boolean hasTagTemplate(); + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagTemplate. + */ + com.google.cloud.datacatalog.v1.TagTemplate getTagTemplate(); + /** + * + * + *
+   * Required. The template to update. The "name" field must be set.
+   * 
+ * + * + * .google.cloud.datacatalog.v1.TagTemplate tag_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuilder(); + + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The field mask specifies the parts of the template to overwrite.
+   * Allowed fields:
+   *   * `display_name`
+   * If absent or empty, all of the allowed fields above will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpec.java new file mode 100644 index 00000000..3ec532a2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpec.java @@ -0,0 +1,631 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
+ * Table view specification.
+ * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ViewSpec} + */ +public final class ViewSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ViewSpec) + ViewSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ViewSpec.newBuilder() to construct. + private ViewSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ViewSpec() { + viewQuery_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ViewSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ViewSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + viewQuery_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_ViewSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ViewSpec.class, + com.google.cloud.datacatalog.v1.ViewSpec.Builder.class); + } + + public static final int VIEW_QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object viewQuery_; + /** + * + * + *
+   * Output only. The query that defines the table view.
+   * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The viewQuery. + */ + public java.lang.String getViewQuery() { + java.lang.Object ref = viewQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + viewQuery_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The query that defines the table view.
+   * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for viewQuery. + */ + public com.google.protobuf.ByteString getViewQueryBytes() { + java.lang.Object ref = viewQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewQuery_ = 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 (!getViewQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, viewQuery_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getViewQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, viewQuery_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ViewSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ViewSpec other = (com.google.cloud.datacatalog.v1.ViewSpec) obj; + + if (!getViewQuery().equals(other.getViewQuery())) return false; + if (!unknownFields.equals(other.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) + VIEW_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getViewQuery().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.ViewSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Table view specification.
+   * 
+ * + * Protobuf type {@code google.cloud.datacatalog.v1.ViewSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ViewSpec) + com.google.cloud.datacatalog.v1.ViewSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_ViewSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ViewSpec.class, + com.google.cloud.datacatalog.v1.ViewSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ViewSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + viewQuery_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.TableSpecOuterClass + .internal_static_google_cloud_datacatalog_v1_ViewSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ViewSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ViewSpec build() { + com.google.cloud.datacatalog.v1.ViewSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ViewSpec buildPartial() { + com.google.cloud.datacatalog.v1.ViewSpec result = + new com.google.cloud.datacatalog.v1.ViewSpec(this); + result.viewQuery_ = viewQuery_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ViewSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.ViewSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ViewSpec other) { + if (other == com.google.cloud.datacatalog.v1.ViewSpec.getDefaultInstance()) return this; + if (!other.getViewQuery().isEmpty()) { + viewQuery_ = other.viewQuery_; + 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.cloud.datacatalog.v1.ViewSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.ViewSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object viewQuery_ = ""; + /** + * + * + *
+     * Output only. The query that defines the table view.
+     * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The viewQuery. + */ + public java.lang.String getViewQuery() { + java.lang.Object ref = viewQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + viewQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The query that defines the table view.
+     * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for viewQuery. + */ + public com.google.protobuf.ByteString getViewQueryBytes() { + java.lang.Object ref = viewQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + viewQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The query that defines the table view.
+     * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The viewQuery to set. + * @return This builder for chaining. + */ + public Builder setViewQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + viewQuery_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The query that defines the table view.
+     * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearViewQuery() { + + viewQuery_ = getDefaultInstance().getViewQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The query that defines the table view.
+     * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for viewQuery to set. + * @return This builder for chaining. + */ + public Builder setViewQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + viewQuery_ = 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.cloud.datacatalog.v1.ViewSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ViewSpec) + private static final com.google.cloud.datacatalog.v1.ViewSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ViewSpec(); + } + + public static com.google.cloud.datacatalog.v1.ViewSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ViewSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ViewSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ViewSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpecOrBuilder.java new file mode 100644 index 00000000..7af36b73 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpecOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/cloud/datacatalog/v1/table_spec.proto + +package com.google.cloud.datacatalog.v1; + +public interface ViewSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ViewSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The query that defines the table view.
+   * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The viewQuery. + */ + java.lang.String getViewQuery(); + /** + * + * + *
+   * Output only. The query that defines the table view.
+   * 
+ * + * string view_query = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for viewQuery. + */ + com.google.protobuf.ByteString getViewQueryBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto new file mode 100644 index 00000000..179a3dc3 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto @@ -0,0 +1,35 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// This enum describes all the possible systems that Data Catalog integrates +// with. +enum IntegratedSystem { + // Default unknown system. + INTEGRATED_SYSTEM_UNSPECIFIED = 0; + + // BigQuery. + BIGQUERY = 1; + + // Cloud Pub/Sub. + CLOUD_PUBSUB = 2; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto new file mode 100644 index 00000000..c0856026 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto @@ -0,0 +1,1180 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1/common.proto"; +import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; +import "google/cloud/datacatalog/v1/schema.proto"; +import "google/cloud/datacatalog/v1/search.proto"; +import "google/cloud/datacatalog/v1/table_spec.proto"; +import "google/cloud/datacatalog/v1/tags.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Data Catalog API service allows clients to discover, understand, and manage +// their data. +service DataCatalog { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Searches Data Catalog for multiple resources like entries, tags that + // match a query. + // + // This is a custom method + // (https://cloud.google.com/apis/design/custom_methods) and does not return + // the complete resource, only the resource identifier and high level + // fields. Clients can subsequentally call `Get` methods. + // + // Note that Data Catalog search queries do not guarantee full recall. Query + // results that match your query may not be returned, even in subsequent + // result pages. Also note that results returned (and not returned) can vary + // across repeated search queries. + // + // See [Data Catalog Search + // Syntax](/data-catalog/docs/how-to/search-reference) for more information. + rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { + option (google.api.http) = { + post: "/v1/catalog:search" + body: "*" + }; + option (google.api.method_signature) = "scope,query"; + } + + // Creates an EntryGroup. + // + // An entry group contains logically related entries together with Cloud + // Identity and Access Management policies that specify the users who can + // create, edit, and view entries within the entry group. + // + // Data Catalog automatically creates an entry group for BigQuery entries + // ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry + // group to contain Cloud Storage fileset entries or custom type entries, + // and the IAM policies associated with those entries. Entry groups, like + // entries, can be searched. + // + // A maximum of 10,000 entry groups may be created per organization across all + // locations. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/entryGroups" + body: "entry_group" + }; + option (google.api.method_signature) = "parent,entry_group_id,entry_group"; + } + + // Gets an EntryGroup. + rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,read_mask"; + } + + // Updates an EntryGroup. The user should enable the Data Catalog API in the + // project identified by the `entry_group.name` parameter (see [Data Catalog + // Resource Project] (/data-catalog/docs/concepts/resource-project) for more + // information). + rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" + body: "entry_group" + }; + option (google.api.method_signature) = "entry_group"; + option (google.api.method_signature) = "entry_group,update_mask"; + } + + // Deletes an EntryGroup. Only entry groups that do not contain entries can be + // deleted. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists entry groups. + rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/entryGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an entry. Only entries of 'FILESET' type or user-specified type can + // be created. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + // + // A maximum of 100,000 entries may be created per entry group. + rpc CreateEntry(CreateEntryRequest) returns (Entry) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" + body: "entry" + }; + option (google.api.method_signature) = "parent,entry_id,entry"; + } + + // Updates an existing entry. + // Users should enable the Data Catalog API in the project identified by + // the `entry.name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { + option (google.api.http) = { + patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" + body: "entry" + }; + option (google.api.method_signature) = "entry"; + option (google.api.method_signature) = "entry,update_mask"; + } + + // Deletes an existing entry. Only entries created through + // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] + // method can be deleted. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets an entry. + rpc GetEntry(GetEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get an entry by target resource name. This method allows clients to use + // the resource name from the source Google Cloud Platform service to get the + // Data Catalog Entry. + rpc LookupEntry(LookupEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/entries:lookup" + }; + } + + // Lists entries. + rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a tag template. The user should enable the Data Catalog API in + // the project identified by the `parent` parameter (see [Data Catalog + // Resource Project](/data-catalog/docs/concepts/resource-project) for more + // information). + rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/tagTemplates" + body: "tag_template" + }; + option (google.api.method_signature) = "parent,tag_template_id,tag_template"; + } + + // Gets a tag template. + rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a tag template. This method cannot be used to update the fields of + // a template. The tag template fields are represented as separate resources + // and should be updated using their own create/update/delete methods. + // Users should enable the Data Catalog API in the project identified by + // the `tag_template.name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { + option (google.api.http) = { + patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" + body: "tag_template" + }; + option (google.api.method_signature) = "tag_template"; + option (google.api.method_signature) = "tag_template,update_mask"; + } + + // Deletes a tag template and all tags using the template. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" + }; + option (google.api.method_signature) = "name,force"; + } + + // Creates a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `parent` parameter (see + // [Data Catalog Resource + // Project](/data-catalog/docs/concepts/resource-project) for more + // information). + rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" + body: "tag_template_field" + }; + option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; + } + + // Updates a field in a tag template. This method cannot be used to update the + // field type. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + body: "tag_template_field" + }; + option (google.api.method_signature) = "name,tag_template_field"; + option (google.api.method_signature) = "name,tag_template_field,update_mask"; + } + + // Renames a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `name` parameter (see [Data Catalog + // Resource Project](/data-catalog/docs/concepts/resource-project) for more + // information). + rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" + body: "*" + }; + option (google.api.method_signature) = "name,new_tag_template_field_id"; + } + + // Deletes a field in a tag template and all uses of that field. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (/data-catalog/docs/concepts/resource-project) for more information). + rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" + }; + option (google.api.method_signature) = "name,force"; + } + + // Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. + // Note: The project identified by the `parent` parameter for the + // [tag](/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) + // and the + // [tag + // template](/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) + // used to create the tag must be from the same organization. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + body: "tag" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" + body: "tag" + } + }; + option (google.api.method_signature) = "parent,tag"; + } + + // Updates an existing tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + body: "tag" + additional_bindings { + patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" + body: "tag" + } + }; + option (google.api.method_signature) = "tag"; + option (google.api.method_signature) = "tag,update_mask"; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Sets the access control policy for a resource. Replaces any existing + // policy. + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + // templates. + // - `datacatalog.entries.setIamPolicy` to set policies on entries. + // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" + body: "*" + } + }; + } + + // Gets the access control policy for a resource. A `NOT_FOUND` error + // is returned if the resource does not exist. An empty policy is returned + // if the resource exists but does not have a policy set on it. + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + // templates. + // - `datacatalog.entries.getIamPolicy` to get policies on entries. + // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" + body: "*" + } + }; + } + + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of permissions is returned + // (We don't return a `NOT_FOUND` error). + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // A caller is not required to have Google IAM permission to make this + // request. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// Request message for +// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. +message SearchCatalogRequest { + // The criteria that select the subspace used for query matching. + message Scope { + // The list of organization IDs to search within. To find your organization + // ID, follow instructions in + // https://cloud.google.com/resource-manager/docs/creating-managing-organization. + repeated string include_org_ids = 2; + + // The list of project IDs to search within. To learn more about the + // distinction between project names/IDs/numbers, go to + // https://cloud.google.com/docs/overview/#projects. + repeated string include_project_ids = 3; + + // If `true`, include Google Cloud Platform (GCP) public datasets in the + // search results. Info on GCP public datasets is available at + // https://cloud.google.com/public-datasets/. By default, GCP public + // datasets are excluded. + bool include_gcp_public_datasets = 7; + } + + // Required. The scope of this search request. A `scope` that has empty + // `include_org_ids`, `include_project_ids` AND false + // `include_gcp_public_datasets` is considered invalid. Data Catalog will + // return an error in such a case. + Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. The query string in search query syntax. The query must be non-empty. + // + // Query strings can be simple as "x" or more qualified as: + // + // * name:x + // * column:x + // * description:y + // + // Note: Query tokens need to have a minimum of 3 characters for substring + // matching to work correctly. See [Data Catalog Search + // Syntax](/data-catalog/docs/how-to/search-reference) for more information. + string query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results in the search page. If <=0 then defaults to 10. Max limit + // for page_size is 1000. Throws an invalid argument for page_size > 1000. + int32 page_size = 2; + + // Optional. Pagination token returned in an earlier + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which + // indicates that this is a continuation of a prior + // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] + // call, and that the system should return the next page of data. If empty, + // the first page is returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the ordering of results, currently supported case-sensitive + // choices are: + // + // * `relevance`, only supports descending + // * `last_modified_timestamp [asc|desc]`, defaults to descending if not + // specified + // + // If not specified, defaults to `relevance` descending. + string order_by = 5; +} + +// Response message for +// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. +message SearchCatalogResponse { + // Search results. + repeated SearchCatalogResult results = 1; + + // The token that can be used to retrieve the next page of results. + string next_page_token = 3; +} + +// Request message for +// [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. +message CreateEntryGroupRequest { + // Required. The name of the project this entry group is in. Example: + // + // * projects/{project_id}/locations/{location} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry group to create. + // The id must begin with a letter or underscore, contain only English + // letters, numbers and underscores, and be at most 64 characters. + string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // The entry group to create. Defaults to an empty entry group. + EntryGroup entry_group = 2; +} + +// Request message for +// [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. +message UpdateEntryGroupRequest { + // Required. The updated entry group. "name" field must be set. + EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry group. If absent or empty, all modifiable + // fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. +message GetEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The fields to return. If not set or empty, all fields are returned. + google.protobuf.FieldMask read_mask = 2; +} + +// Request message for +// [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. +message DeleteEntryGroupRequest { + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. If true, deletes all entries in the entry group. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsRequest { + // Required. The name of the location that contains the entry groups, which can be + // provided in URL format. Example: + // + // * projects/{project_id}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. +message ListEntryGroupsResponse { + // EntryGroup details. + repeated EntryGroup entry_groups = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Request message for +// [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. +message CreateEntryRequest { + // Required. The name of the entry group this entry is in. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // Required. The id of the entry to create. + string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entry to create. + Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. +message UpdateEntryRequest { + // Required. The updated entry. The "name" field must be set. + Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the entry. If absent or empty, all modifiable + // fields are updated. + // + // The following fields are modifiable: + // * For entries with type `DATA_STREAM`: + // * `schema` + // * For entries with type `FILESET` + // * `schema` + // * `display_name` + // * `description` + // * `gcs_fileset_spec` + // * `gcs_fileset_spec.file_patterns` + // * For entries with `user_specified_type` + // * `schema` + // * `display_name` + // * `description` + // * user_specified_type + // * user_specified_system + // * linked_resource + // * source_system_timestamps + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. +message DeleteEntryRequest { + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Request message for +// [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. +message GetEntryRequest { + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Request message for +// [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. +message LookupEntryRequest { + // Required. Represents either the Google Cloud Platform resource or SQL name + // for a Google Cloud Platform resource. + oneof target_name { + // The full name of the Google Cloud Platform resource the Data Catalog + // entry represents. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Full names are case-sensitive. + // + // Examples: + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // * //pubsub.googleapis.com/projects/projectId/topics/topicId + string linked_resource = 1; + + // The SQL name of the entry. SQL names are case-sensitive. + // + // Examples: + // + // * `cloud_pubsub.project_id.topic_id` + // * ``pubsub.project_id.`topic.id.with.dots` `` + // * `bigquery.table.project_id.dataset_id.table_id` + // * `bigquery.dataset.project_id.dataset_id` + // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` + // + // `*_id`s shoud satisfy the standard SQL rules for identifiers. + // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. + string sql_resource = 3; + } +} + +// Entry Metadata. +// A Data Catalog Entry resource represents another resource in Google +// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or +// outside of Google Cloud Platform. Clients can use the `linked_resource` field +// in the Entry resource to refer to the original resource ID of the source +// system. +// +// An Entry resource contains resource details, such as its schema. An Entry can +// also be used to attach flexible metadata, such as a +// [Tag][google.cloud.datacatalog.v1.Tag]. +message Entry { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Entry" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" + }; + + // The Data Catalog resource name of the entry in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + string name = 1 [(google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + }]; + + // The resource this metadata entry refers to. + // + // For Google Cloud Platform resources, `linked_resource` is the [full name of + // the + // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). + // For example, the `linked_resource` for a table resource from BigQuery is: + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // + // Output only when Entry is of type in the EntryType enum. For entries with + // user_specified_type, this field is optional and defaults to an empty + // string. + string linked_resource = 9; + + // Required. Entry type. + oneof entry_type { + // The type of the entry. + // Only used for Entries with types in the EntryType enum. + EntryType type = 2; + + // Entry type if it does not fit any of the input-allowed values listed in + // `EntryType` enum above. When creating an entry, users should check the + // enum values first, if nothing matches the entry to be created, then + // provide a custom value, for example "my_special_type". + // `user_specified_type` strings must begin with a letter or underscore and + // can only contain letters, numbers, and underscores; are case insensitive; + // must be at least 1 character and at most 64 characters long. + // + // Currently, only FILESET enum value is allowed. All other entries created + // through Data Catalog must use `user_specified_type`. + string user_specified_type = 16; + } + + // The source system of the entry. + oneof system { + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Pub/Sub. + IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This field indicates the entry's source system that Data Catalog does not + // integrate with. `user_specified_system` strings must begin with a letter + // or underscore and can only contain letters, numbers, and underscores; are + // case insensitive; must be at least 1 character and at most 64 characters + // long. + string user_specified_system = 18; + } + + // Type specification information. + oneof type_spec { + // Specification that applies to a Cloud Storage fileset. This is only valid + // on entries of type FILESET. + GcsFilesetSpec gcs_fileset_spec = 6; + + // Specification that applies to a BigQuery table. This is only valid on + // entries of type `TABLE`. + BigQueryTableSpec bigquery_table_spec = 12; + + // Specification for a group of BigQuery tables with name pattern + // `[prefix]YYYYMMDD`. Context: + // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. + BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; + } + + // Display information such as title and description. A short name to identify + // the entry, for example, "Analytics Data - Jan 2011". Default value is an + // empty string. + string display_name = 3; + + // Entry description, which can consist of several sentences or paragraphs + // that describe entry contents. Default value is an empty string. + string description = 4; + + // Schema of the entry. An entry might not have any schema attached to it. + Schema schema = 5; + + // Timestamps about the underlying resource, not about this Data Catalog + // entry. Output only when Entry is of type in the EntryType enum. For entries + // with user_specified_type, this field is optional and defaults to an empty + // timestamp. + SystemTimestamps source_system_timestamps = 7; +} + +// EntryGroup Metadata. +// An EntryGroup resource represents a logical grouping of zero or more +// Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources. +message EntryGroup { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/EntryGroup" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" + }; + + // The resource name of the entry group in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + string name = 1; + + // A short name to identify the entry group, for example, + // "analytics data - jan 2011". Default value is an empty string. + string display_name = 2; + + // Entry group description, which can consist of several sentences or + // paragraphs that describe entry group contents. Default value is an empty + // string. + string description = 3; + + // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. + SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. +message CreateTagTemplateRequest { + // Required. The name of the project and the template location + // [region](/compute/docs/regions-zones/#available). + // NOTE: Currently, only the `us-central1 region` is supported. + // + // Example: + // + // * projects/{project_id}/locations/us-central1 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. The id of the tag template to create. + string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The tag template to create. + TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. +message GetTagTemplateRequest { + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; +} + +// Request message for +// [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. +message UpdateTagTemplateRequest { + // Required. The template to update. The "name" field must be set. + TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; + + // The field mask specifies the parts of the template to overwrite. + // + // Allowed fields: + // + // * `display_name` + // + // If absent or empty, all of the allowed fields above will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. +message DeleteTagTemplateRequest { + // Required. The name of the tag template to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of any possible tags using this template. + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. +message CreateTagRequest { + // Required. The name of the resource to attach this tag to. Tags can be attached to + // Entries. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Tag and its child resources may not actually be stored in + // the location in this name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Tag" + } + ]; + + // Required. The tag to create. + Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. +message UpdateTagRequest { + // Required. The updated tag. The "name" field must be set. + Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; + + // The fields to update on the Tag. If absent or empty, all modifiable fields + // are updated. Currently the only modifiable field is the field `fields`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. +message DeleteTagRequest { + // Required. The name of the tag to delete. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; +} + +// Request message for +// [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. +message CreateTagTemplateFieldRequest { + // Required. The name of the project and the template location + // [region](/compute/docs/regions-zones/#available). + // NOTE: Currently, only the `us-central1 region` is supported. + // + // Example: + // + // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplate" + } + ]; + + // Required. The ID of the tag template field to create. + // Field ids can contain letters (both uppercase and lowercase), numbers + // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + // character long and at most 128 characters long. Field IDs must also be + // unique within their template. + string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The tag template field to create. + TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. +message UpdateTagTemplateFieldRequest { + // Required. The name of the tag template field. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. The template to update. + TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The field mask specifies the parts of the template to be updated. + // Allowed fields: + // + // * `display_name` + // * `type.enum_type` + // * `is_required` + // + // If `update_mask` is not set or empty, all of the allowed fields above will + // be updated. + // + // When updating an enum type, the provided values will be merged with the + // existing values. Therefore, enum values can only be added, existing enum + // values cannot be deleted nor renamed. Updating a template field from + // optional to required is NOT allowed. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. +message RenameTagTemplateFieldRequest { + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. The new ID of this tag template field. For example, `my_new_field`. + string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. +message DeleteTagTemplateFieldRequest { + // Required. The name of the tag template field to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateField" + } + ]; + + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of this field from any tags using this field. + // `force = false` will be supported in the future. + bool force = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. +message ListTagsRequest { + // Required. The name of the Data Catalog resource to list the tags of. The resource + // could be an [Entry][google.cloud.datacatalog.v1.Entry] or an + // [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + // + // Examples: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Tag" + } + ]; + + // The maximum number of tags to return. Default is 10. Max limit is 1000. + int32 page_size = 2; + + // Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3; +} + +// Response message for +// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. +message ListTagsResponse { + // [Tag][google.cloud.datacatalog.v1.Tag] details. + repeated Tag tags = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Request message for +// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. +message ListEntriesRequest { + // Required. The name of the entry group that contains the entries, which can + // be provided in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; + + // The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + int32 page_size = 2; + + // Token that specifies which page is requested. If empty, the first page is + // returned. + string page_token = 3; + + // The fields to return for each Entry. If not set or empty, all + // fields are returned. + // For example, setting read_mask to contain only one path "name" will cause + // ListEntries to return a list of Entries with only "name" field. + google.protobuf.FieldMask read_mask = 4; +} + +// Response message for +// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. +message ListEntriesResponse { + // Entry details. + repeated Entry entries = 1; + + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + string next_page_token = 2; +} + +// Entry resources in Data Catalog can be of different types e.g. a BigQuery +// Table entry is of type `TABLE`. This enum describes all the possible types +// Data Catalog contains. +enum EntryType { + // Default unknown type. + ENTRY_TYPE_UNSPECIFIED = 0; + + // Output only. The type of entry that has a GoogleSQL schema, including + // logical views. + TABLE = 2; + + // Output only. The type of models, examples include + // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro + MODEL = 5; + + // Output only. An entry type which is used for streaming entries. Example: + // Pub/Sub topic. + DATA_STREAM = 3; + + // An entry type which is a set of files or objects. Example: + // Cloud Storage fileset. + FILESET = 4; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto new file mode 100644 index 00000000..ec199269 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto @@ -0,0 +1,72 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Describes a Cloud Storage fileset entry. +message GcsFilesetSpec { + // Required. Patterns to identify a set of files in Google Cloud Storage. See [Cloud + // Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for + // more information. Note that bucket wildcards are currently not supported. + // + // Examples of valid file_patterns: + // + // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` + // directory. + // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + // spanning all subdirectories. + // * `gs://bucket_name/file*`: matches files prefixed by `file` in + // `bucket_name` + // * `gs://bucket_name/??.txt`: matches files with two characters followed by + // `.txt` in `bucket_name` + // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single + // vowel character followed by `.txt` in + // `bucket_name` + // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + // or `m` followed by `.txt` in `bucket_name` + // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + // `a/*/b` pattern, such as `a/c/b`, `a/d/b` + // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + // + // You can combine wildcards to provide more powerful matches, for example: + // + // * `gs://bucket_name/[a-m]??.j*g` + repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Sample files contained in this fileset, not all files + // contained in this fileset are represented here. + repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifications of a single file in Cloud Storage. +message GcsFileSpec { + // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. + string file_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamps about the Cloud Storage file. + SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The size of the file, in bytes. + int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto new file mode 100644 index 00000000..d6daa5da --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto @@ -0,0 +1,52 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). +message Schema { + // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. + repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Representation of a column within a schema. Columns could be nested inside +// other columns. +message ColumnSchema { + // Required. Name of the column. + string column = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of the column. + string type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of the column. Default value is an empty string. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A column's mode indicates whether the values in this column are required, + // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Default mode is `NULLABLE`. + string mode = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Schema of sub-columns. A column can have zero or more sub-columns. + repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto new file mode 100644 index 00000000..2aac3b3a --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto @@ -0,0 +1,81 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/datacatalog/v1/common.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// A result that appears in the response of a search request. Each result +// captures details of one entry that matches the search. +message SearchCatalogResult { + // Type of the search result. This field can be used to determine which Get + // method to call to fetch the full resource. + SearchResultType search_result_type = 1; + + // Sub-type of the search result. This is a dot-delimited description of the + // resource's full type, and is the same as the value callers would provide in + // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, + // `tagTemplate`. + string search_result_subtype = 2; + + // The relative resource name of the resource in URL format. + // Examples: + // + // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` + // * `projects/{project_id}/tagTemplates/{tag_template_id}` + string relative_resource_name = 3; + + // The full name of the cloud resource the entry belongs to. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Example: + // + // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` + string linked_resource = 4; + + // The source system of the entry. Only applicable when `search_result_type` + // is ENTRY. + oneof system { + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Cloud Pub/Sub. + IntegratedSystem integrated_system = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This field indicates the entry's source system that Data Catalog does not + // integrate with. + string user_specified_system = 9; + } +} + +// The different types of resources that can be returned in search. +enum SearchResultType { + // Default unknown type. + SEARCH_RESULT_TYPE_UNSPECIFIED = 0; + + // An [Entry][google.cloud.datacatalog.v1.Entry]. + ENTRY = 1; + + // A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. + TAG_TEMPLATE = 2; + + // An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. + ENTRY_GROUP = 3; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto new file mode 100644 index 00000000..40e1069b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto @@ -0,0 +1,98 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Describes a BigQuery table. +message BigQueryTableSpec { + // Output only. The table source type. + TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. + oneof type_spec { + // Table view specification. This field should only be populated if + // `table_source_type` is `BIGQUERY_VIEW`. + ViewSpec view_spec = 2; + + // Spec of a BigQuery table. This field should only be populated if + // `table_source_type` is `BIGQUERY_TABLE`. + TableSpec table_spec = 3; + } +} + +// Table source type. +enum TableSourceType { + // Default unknown type. + TABLE_SOURCE_TYPE_UNSPECIFIED = 0; + + // Table view. + BIGQUERY_VIEW = 2; + + // BigQuery native table. + BIGQUERY_TABLE = 5; +} + +// Table view specification. +message ViewSpec { + // Output only. The query that defines the table view. + string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Normal BigQuery table spec. +message TableSpec { + // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, + // `grouped_entry` is the Data Catalog resource name of the date sharded + // grouped entry, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + // Otherwise, `grouped_entry` is empty. + string grouped_entry = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; +} + +// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. +// Context: +// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding +message BigQueryDateShardedSpec { + // Output only. The Data Catalog resource name of the dataset entry the current table + // belongs to, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + string dataset = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Entry" + } + ]; + + // Output only. The table name prefix of the shards. The name of any given shard is + // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the + // `table_prefix` is `MyTable`. + string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total number of shards. + int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto new file mode 100644 index 00000000..7fb833d9 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto @@ -0,0 +1,223 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Tags are used to attach custom metadata to Data Catalog resources. Tags +// conform to the specifications within their tag template. +// +// See [Data Catalog IAM](/data-catalog/docs/concepts/iam) for information on +// the permissions needed to create or view tags. +message Tag { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Tag" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" + }; + + // The resource name of the tag in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + // + // where `tag_id` is a system-generated identifier. + // Note that this Tag may not actually be stored in the location in this name. + string name = 1; + + // Required. The resource name of the tag template that this tag uses. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // This field cannot be modified after creation. + string template = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The display name of the tag template. + string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The scope within the parent resource that this tag is attached to. If not + // provided, the tag is attached to the parent resource itself. + // Deleting the scope from the parent resource will delete all tags attached + // to that scope. These fields cannot be updated after creation. + oneof scope { + // Resources like Entry can have schemas associated with them. This scope + // allows users to attach tags to an individual column based on that schema. + // + // For attaching a tag to a nested column, use `.` to separate the column + // names. Example: + // + // * `outer_column.inner_column` + string column = 4; + } + + // Required. This maps the ID of a tag field to the value of and additional information + // about that field. Valid field IDs are defined by the tag's template. A tag + // must have at least 1 field and at most 500 fields. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Contains the value and supporting information for a field within +// a [Tag][google.cloud.datacatalog.v1.Tag]. +message TagField { + // Holds an enum value. + message EnumValue { + // The display name of the enum value. + string display_name = 1; + } + + // Output only. The display name of this field. + string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The value of this field. + oneof kind { + // Holds the value for a tag field with double type. + double double_value = 2; + + // Holds the value for a tag field with string type. + string string_value = 3; + + // Holds the value for a tag field with boolean type. + bool bool_value = 4; + + // Holds the value for a tag field with timestamp type. + google.protobuf.Timestamp timestamp_value = 5; + + // Holds the value for a tag field with enum type. This value must be + // one of the allowed values in the definition of this enum. + EnumValue enum_value = 6; + } + + // Output only. The order of this field with respect to other fields in this tag. It can be + // set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For + // example, a higher value can indicate a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A tag template defines a tag, which can have one or more typed fields. +// The template is used to create and attach the tag to GCP resources. +// [Tag template roles](/iam/docs/understanding-roles#data-catalog-roles) +// provide permissions to create, edit, and use the template. See, for example, +// the [TagTemplate User](/data-catalog/docs/how-to/template-user) role, which +// includes permission to use the tag template to tag resources. +message TagTemplate { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplate" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" + }; + + // The resource name of the tag template in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // Note that this TagTemplate and its child resources may not actually be + // stored in the location in this name. + string name = 1; + + // The display name for this template. Defaults to an empty string. + string display_name = 2; + + // Required. Map of tag template field IDs to the settings for the field. + // This map is an exhaustive list of the allowed fields. This map must contain + // at least one field and at most 500 fields. + // + // The keys to this map are tag template field IDs. Field IDs can contain + // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). + // Field IDs must be at least 1 character long and at most + // 64 characters long. Field IDs must start with a letter or underscore. + map fields = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The template for an individual field within a tag template. +message TagTemplateField { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/TagTemplateField" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" + }; + + // Output only. The resource name of the tag template field in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + // + // Note that this TagTemplateField may not actually be stored in the location + // in this name. + string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The display name for this field. Defaults to an empty string. + string display_name = 1; + + // Required. The type of value this tag field can contain. + FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether this is a required field. Defaults to false. + bool is_required = 3; + + // The order of this field with respect to other fields in this tag + // template. For example, a higher value can indicate a more important field. + // The value can be negative. Multiple fields can have the same order, and + // field orders within a tag do not have to be sequential. + int32 order = 5; +} + +message FieldType { + message EnumType { + message EnumValue { + // Required. The display name of the enum value. Must not be an empty string. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Required on create; optional on update. The set of allowed values for + // this enum. This set must not be empty, the display names of the values in + // this set must not be empty and the display names of the values must be + // case-insensitively unique within this set. Currently, enum values can + // only be added to the list of allowed values. Deletion and renaming of + // enum values are not supported. Can have up to 500 allowed values. + repeated EnumValue allowed_values = 1; + } + + enum PrimitiveType { + // This is the default invalid value for a type. + PRIMITIVE_TYPE_UNSPECIFIED = 0; + + // A double precision number. + DOUBLE = 1; + + // An UTF-8 string. + STRING = 2; + + // A boolean value. + BOOL = 3; + + // A timestamp. + TIMESTAMP = 4; + } + + // Required. + oneof type_decl { + // Represents primitive types - string, bool etc. + PrimitiveType primitive_type = 1; + + // Represents an enum type. + EnumType enum_type = 2; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto new file mode 100644 index 00000000..ed4e3e10 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto @@ -0,0 +1,38 @@ +// 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 +// +// 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.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datacatalog.v1"; + +// Timestamps about this resource according to a particular system. +message SystemTimestamps { + // The creation time of the resource within the given system. + google.protobuf.Timestamp create_time = 1; + + // The last-modified time of the resource within the given system. + google.protobuf.Timestamp update_time = 2; + + // Output only. The expiration time of the resource within the given system. + // Currently only apllicable to BigQuery resources. + google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/synth.metadata b/synth.metadata index 8134daf3..89ef5bc6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,21 +1,28 @@ { - "updateTime": "2020-03-25T17:03:08.670187Z", + "updateTime": "2020-03-26T05:17:52.196337Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0e07113e776bdd8fcc0783372e08bb6e76cb1b5b", - "internalRef": "302892245", - "log": "0e07113e776bdd8fcc0783372e08bb6e76cb1b5b\ndocs: Update documentation with links to smart home developer guides and reference pages. Remove outdated authorization instructions.\n\nPiperOrigin-RevId: 302892245\n\n" + "sha": "d4aa417ed2bba89c2d216900282bddfdafef6128", + "internalRef": "303010132" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "d4aa417ed2bba89c2d216900282bddfdafef6128", + "internalRef": "303010132", + "log": "d4aa417ed2bba89c2d216900282bddfdafef6128\nFix incorrect retry config in gapic v2 for kms.\n\nPiperOrigin-RevId: 303010132\n\nfd08334533204fdd1b33f79fcb263dbb5bf13de0\nfix: osconfig/v1 update go_gapic_library target to microgen interface\n\nPiperOrigin-RevId: 303007866\n\ne2c0f2a0e06d86b50aba98f67f9f291587d986b3\nUpdate comments for google/rpc/error_details.proto.\n\nPiperOrigin-RevId: 303002528\n\nf786c7586748e78a286b1620ff3ddbf7b4dcab92\nfeat: Add OsConfigService v1 patch APIs.\n\nPiperOrigin-RevId: 302999346\n\n0341fa3fc2f4073a1b1f260d37b2ce620799f545\nTurn on gapic config v2 for kms.\n\nCommitter: @hzyi-google\nPiperOrigin-RevId: 302980301\n\n32dc6e832039b61ac3fb82c72eb0a27570aebcd6\nredis: v1beta1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302958009\n\n685f16483cc4d87c35051f21f8f13ef4fdc919b4\nredis: v1 enables REDIS_5_0 as an option for redis_version field and adds two new redis configs --stream-node-max-entries --stream-node-max-bytes\n\nPiperOrigin-RevId: 302957729\n\n733cb282ae5e64673ef86c9a5dff647df803d8b7\nAdd GAPIC cofiguration for v1 client library genetration.\n\nPiperOrigin-RevId: 302928200\n\n1b0fff5f2ec6dc4a9443d9b50e70e9c94c30c45b\ndocs: remove an internal lint declaration\n\nPiperOrigin-RevId: 302928106\n\n2be23f3f3036a6f7ce0844def3d2d3da74e5d415\nfix(google/maps): Add post-processing rules for Google Maps APIs\n\nPiperOrigin-RevId: 302925222\n\nfd83ab212176a1042e8d45ea90766b3bf59ac679\nfix: migrate osconfig/agentendpoint/v1 go_gapic_library target to microgen impl\n\nPiperOrigin-RevId: 302913609\n\n" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8", - "log": "e36822bfa0acb355502dab391b8ef9c4f30208d8\nchore(java): treat samples shared configuration dependency update as chore (#457)\n\n\n1b4cc80a7aaf164f6241937dd87f3bd1f4149e0c\nfix: do not run node 8 CI (#456)\n\n\n" + "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8" } } ], @@ -28,6 +35,15 @@ "language": "java", "generator": "bazel" } + }, + { + "client": { + "source": "googleapis", + "apiName": "datacatalog", + "apiVersion": "v1", + "language": "java", + "generator": "bazel" + } } ] } \ No newline at end of file diff --git a/synth.py b/synth.py index f246636b..47695858 100644 --- a/synth.py +++ b/synth.py @@ -18,7 +18,7 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -versions = ['v1beta1'] +versions = ['v1beta1', 'v1'] service = 'datacatalog' for version in versions: diff --git a/versions.txt b/versions.txt index 81269568..ea9b085b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,8 @@ # Format: # module:released-version:current-version +proto-google-cloud-datacatalog-v1:0.33.0:0.33.1-SNAPSHOT proto-google-cloud-datacatalog-v1beta1:0.33.0:0.33.1-SNAPSHOT +grpc-google-cloud-datacatalog-v1:0.33.0:0.33.1-SNAPSHOT grpc-google-cloud-datacatalog-v1beta1:0.33.0:0.33.1-SNAPSHOT google-cloud-datacatalog:0.33.0:0.33.1-SNAPSHOT