From 63216a4cd02bf22de154a400f19d1fa3690be92f Mon Sep 17 00:00:00 2001 From: suztomo Date: Tue, 18 Oct 2022 18:47:19 +0000 Subject: [PATCH] chore: Adding java diffs --- .../v1/AnalyticsHubServiceClient.java | 2142 -------- .../v1/AnalyticsHubServiceSettings.java | 380 -- .../analyticshub/v1/package-info.java | 47 - .../v1/stub/AnalyticsHubServiceStub.java | 140 - .../stub/AnalyticsHubServiceStubSettings.java | 902 ---- ...rpcAnalyticsHubServiceCallableFactory.java | 113 - .../v1/stub/GrpcAnalyticsHubServiceStub.java | 665 --- ...sonAnalyticsHubServiceCallableFactory.java | 105 - .../stub/HttpJsonAnalyticsHubServiceStub.java | 1013 ---- ...AnalyticsHubServiceClientHttpJsonTest.java | 1342 ----- .../v1/AnalyticsHubServiceClientTest.java | 1158 ----- .../v1/MockAnalyticsHubService.java | 59 - .../v1/MockAnalyticsHubServiceImpl.java | 380 -- .../v1/AnalyticsHubServiceGrpc.java | 2087 -------- .../analyticshub/v1/AnalyticsHubProto.java | 602 --- .../v1/CreateDataExchangeRequest.java | 1147 ----- .../CreateDataExchangeRequestOrBuilder.java | 130 - .../analyticshub/v1/CreateListingRequest.java | 1140 ----- .../v1/CreateListingRequestOrBuilder.java | 130 - .../analyticshub/v1/DataExchange.java | 1604 ------ .../analyticshub/v1/DataExchangeName.java | 227 - .../v1/DataExchangeOrBuilder.java | 200 - .../analyticshub/v1/DataProvider.java | 801 --- .../v1/DataProviderOrBuilder.java | 77 - .../v1/DeleteDataExchangeRequest.java | 647 --- .../DeleteDataExchangeRequestOrBuilder.java | 56 - .../analyticshub/v1/DeleteListingRequest.java | 642 --- .../v1/DeleteListingRequestOrBuilder.java | 56 - .../analyticshub/v1/DestinationDataset.java | 1870 ------- .../v1/DestinationDatasetOrBuilder.java | 251 - .../v1/DestinationDatasetReference.java | 818 ---- .../DestinationDatasetReferenceOrBuilder.java | 79 - .../v1/GetDataExchangeRequest.java | 643 --- .../v1/GetDataExchangeRequestOrBuilder.java | 56 - .../analyticshub/v1/GetListingRequest.java | 637 --- .../v1/GetListingRequestOrBuilder.java | 56 - .../v1/ListDataExchangesRequest.java | 927 ---- .../v1/ListDataExchangesRequestOrBuilder.java | 97 - .../v1/ListDataExchangesResponse.java | 1133 ----- .../ListDataExchangesResponseOrBuilder.java | 103 - .../analyticshub/v1/ListListingsRequest.java | 920 ---- .../v1/ListListingsRequestOrBuilder.java | 97 - .../analyticshub/v1/ListListingsResponse.java | 1116 ----- .../v1/ListListingsResponseOrBuilder.java | 102 - .../v1/ListOrgDataExchangesRequest.java | 915 ---- .../ListOrgDataExchangesRequestOrBuilder.java | 93 - .../v1/ListOrgDataExchangesResponse.java | 1136 ----- ...ListOrgDataExchangesResponseOrBuilder.java | 103 - .../bigquery/analyticshub/v1/Listing.java | 4335 ----------------- .../bigquery/analyticshub/v1/ListingName.java | 269 - .../analyticshub/v1/ListingOrBuilder.java | 447 -- .../analyticshub/v1/LocationName.java | 192 - .../bigquery/analyticshub/v1/Publisher.java | 800 --- .../analyticshub/v1/PublisherOrBuilder.java | 77 - .../v1/SubscribeListingRequest.java | 1037 ---- .../v1/SubscribeListingRequestOrBuilder.java | 95 - .../v1/SubscribeListingResponse.java | 447 -- .../v1/SubscribeListingResponseOrBuilder.java | 24 - .../v1/UpdateDataExchangeRequest.java | 1040 ---- .../UpdateDataExchangeRequestOrBuilder.java | 110 - .../analyticshub/v1/UpdateListingRequest.java | 1033 ---- .../v1/UpdateListingRequestOrBuilder.java | 110 - .../analyticshub/v1/analyticshub.proto | 651 --- .../com/google/cloud/dataplex/v1/Action.java | 1409 +++--- .../com/google/cloud/dataplex/v1/Asset.java | 1640 +++---- .../google/cloud/dataplex/v1/AssetStatus.java | 142 +- .../cloud/dataplex/v1/CancelJobRequest.java | 112 +- .../com/google/cloud/dataplex/v1/Content.java | 509 +- .../cloud/dataplex/v1/CreateAssetRequest.java | 157 +- .../dataplex/v1/CreateContentRequest.java | 146 +- .../dataplex/v1/CreateEntityRequest.java | 145 +- .../dataplex/v1/CreateEnvironmentRequest.java | 159 +- .../cloud/dataplex/v1/CreateLakeRequest.java | 157 +- .../dataplex/v1/CreatePartitionRequest.java | 146 +- .../cloud/dataplex/v1/CreateTaskRequest.java | 157 +- .../cloud/dataplex/v1/CreateZoneRequest.java | 157 +- .../cloud/dataplex/v1/DeleteAssetRequest.java | 112 +- .../dataplex/v1/DeleteContentRequest.java | 113 +- .../dataplex/v1/DeleteEntityRequest.java | 125 +- .../dataplex/v1/DeleteEnvironmentRequest.java | 113 +- .../cloud/dataplex/v1/DeleteLakeRequest.java | 112 +- .../dataplex/v1/DeletePartitionRequest.java | 126 +- .../cloud/dataplex/v1/DeleteTaskRequest.java | 112 +- .../cloud/dataplex/v1/DeleteZoneRequest.java | 112 +- .../cloud/dataplex/v1/DiscoveryEvent.java | 825 ++-- .../com/google/cloud/dataplex/v1/Entity.java | 630 +-- .../google/cloud/dataplex/v1/Environment.java | 1187 ++--- .../cloud/dataplex/v1/GetAssetRequest.java | 112 +- .../cloud/dataplex/v1/GetContentRequest.java | 125 +- .../cloud/dataplex/v1/GetEntityRequest.java | 125 +- .../dataplex/v1/GetEnvironmentRequest.java | 113 +- .../cloud/dataplex/v1/GetJobRequest.java | 112 +- .../cloud/dataplex/v1/GetLakeRequest.java | 112 +- .../dataplex/v1/GetPartitionRequest.java | 112 +- .../cloud/dataplex/v1/GetTaskRequest.java | 112 +- .../cloud/dataplex/v1/GetZoneRequest.java | 112 +- .../com/google/cloud/dataplex/v1/Job.java | 230 +- .../google/cloud/dataplex/v1/JobEvent.java | 230 +- .../com/google/cloud/dataplex/v1/Lake.java | 585 +-- .../dataplex/v1/ListActionsResponse.java | 145 +- .../dataplex/v1/ListAssetActionsRequest.java | 137 +- .../cloud/dataplex/v1/ListAssetsRequest.java | 162 +- .../cloud/dataplex/v1/ListAssetsResponse.java | 145 +- .../cloud/dataplex/v1/ListContentRequest.java | 149 +- .../dataplex/v1/ListContentResponse.java | 145 +- .../dataplex/v1/ListEntitiesRequest.java | 162 +- .../dataplex/v1/ListEntitiesResponse.java | 146 +- .../dataplex/v1/ListEnvironmentsRequest.java | 163 +- .../dataplex/v1/ListEnvironmentsResponse.java | 146 +- .../cloud/dataplex/v1/ListJobsRequest.java | 136 +- .../cloud/dataplex/v1/ListJobsResponse.java | 143 +- .../dataplex/v1/ListLakeActionsRequest.java | 137 +- .../cloud/dataplex/v1/ListLakesRequest.java | 162 +- .../cloud/dataplex/v1/ListLakesResponse.java | 164 +- .../dataplex/v1/ListPartitionsRequest.java | 150 +- .../dataplex/v1/ListPartitionsResponse.java | 146 +- .../dataplex/v1/ListSessionsRequest.java | 149 +- .../dataplex/v1/ListSessionsResponse.java | 146 +- .../cloud/dataplex/v1/ListTasksRequest.java | 162 +- .../cloud/dataplex/v1/ListTasksResponse.java | 164 +- .../dataplex/v1/ListZoneActionsRequest.java | 137 +- .../cloud/dataplex/v1/ListZonesRequest.java | 162 +- .../cloud/dataplex/v1/ListZonesResponse.java | 144 +- .../google/cloud/dataplex/v1/LogsProto.java | 142 +- .../cloud/dataplex/v1/OperationMetadata.java | 204 +- .../google/cloud/dataplex/v1/Partition.java | 159 +- .../com/google/cloud/dataplex/v1/Schema.java | 508 +- .../com/google/cloud/dataplex/v1/Session.java | 159 +- .../cloud/dataplex/v1/SessionEvent.java | 865 +++- .../dataplex/v1/SessionEventOrBuilder.java | 68 +- .../cloud/dataplex/v1/StorageFormat.java | 459 +- .../com/google/cloud/dataplex/v1/Task.java | 3782 +++++++++----- .../cloud/dataplex/v1/TaskOrBuilder.java | 35 + .../google/cloud/dataplex/v1/TasksProto.java | 162 +- .../cloud/dataplex/v1/UpdateAssetRequest.java | 152 +- .../dataplex/v1/UpdateContentRequest.java | 154 +- .../dataplex/v1/UpdateEntityRequest.java | 132 +- .../dataplex/v1/UpdateEnvironmentRequest.java | 154 +- .../cloud/dataplex/v1/UpdateLakeRequest.java | 152 +- .../cloud/dataplex/v1/UpdateTaskRequest.java | 152 +- .../cloud/dataplex/v1/UpdateZoneRequest.java | 152 +- .../com/google/cloud/dataplex/v1/Zone.java | 916 ++-- .../proto/google/cloud/dataplex/v1/logs.proto | 20 +- .../google/cloud/dataplex/v1/tasks.proto | 24 + ...blicCertificateAuthorityServiceClient.java | 367 -- ...icCertificateAuthorityServiceSettings.java | 213 - .../publicca/v1beta1/package-info.java | 49 - ...ficateAuthorityServiceCallableFactory.java | 116 - ...PublicCertificateAuthorityServiceStub.java | 174 - ...ficateAuthorityServiceCallableFactory.java | 105 - ...PublicCertificateAuthorityServiceStub.java | 206 - ...PublicCertificateAuthorityServiceStub.java | 43 - ...rtificateAuthorityServiceStubSettings.java | 338 -- ...MockPublicCertificateAuthorityService.java | 59 - ...PublicCertificateAuthorityServiceImpl.java | 83 - ...ateAuthorityServiceClientHttpJsonTest.java | 174 - ...CertificateAuthorityServiceClientTest.java | 171 - ...PublicCertificateAuthorityServiceGrpc.java | 390 -- .../CreateExternalAccountKeyRequest.java | 1002 ---- ...ateExternalAccountKeyRequestOrBuilder.java | 109 - .../publicca/v1beta1/ExternalAccountKey.java | 923 ---- .../v1beta1/ExternalAccountKeyName.java | 231 - .../v1beta1/ExternalAccountKeyOrBuilder.java | 96 - .../publicca/v1beta1/LocationName.java | 192 - .../publicca/v1beta1/ResourcesProto.java | 87 - .../publicca/v1beta1/ServiceProto.java | 109 - .../security/publicca/v1beta1/resources.proto | 52 - .../security/publicca/v1beta1/service.proto | 68 - 168 files changed, 10705 insertions(+), 57299 deletions(-) delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClient.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceSettings.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/package-info.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStubSettings.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceCallableFactory.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceStub.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceCallableFactory.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceStub.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientHttpJsonTest.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientTest.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubService.java delete mode 100644 java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubServiceImpl.java delete mode 100644 java-analyticshub/grpc-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceGrpc.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubProto.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchange.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeName.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProvider.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProviderOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDataset.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReference.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReferenceOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponse.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponseOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponse.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponseOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponse.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponseOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Listing.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingName.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/LocationName.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Publisher.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/PublisherOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponse.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponseOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequest.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequestOrBuilder.java delete mode 100644 java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/proto/google/cloud/bigquery/analyticshub/v1/analyticshub.proto delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClient.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceSettings.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/package-info.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceCallableFactory.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceStub.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceCallableFactory.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceStub.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStub.java delete mode 100644 java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStubSettings.java delete mode 100644 java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityService.java delete mode 100644 java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityServiceImpl.java delete mode 100644 java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientHttpJsonTest.java delete mode 100644 java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientTest.java delete mode 100644 java-publicca/grpc-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceGrpc.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequest.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequestOrBuilder.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKey.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyName.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyOrBuilder.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/LocationName.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ResourcesProto.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ServiceProto.java delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/proto/google/cloud/security/publicca/v1beta1/resources.proto delete mode 100644 java-publicca/proto-google-cloud-publicca-v1beta1/src/main/proto/google/cloud/security/publicca/v1beta1/service.proto diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClient.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClient.java deleted file mode 100644 index 2ebadbb38b64..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClient.java +++ /dev/null @@ -1,2142 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigquery.analyticshub.v1.stub.AnalyticsHubServiceStub; -import com.google.cloud.bigquery.analyticshub.v1.stub.AnalyticsHubServiceStubSettings; -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 CLASS. -/** - * Service Description: The `AnalyticsHubService` API facilitates data sharing within and across - * organizations. It allows data providers to publish listings that reference shared datasets. With - * Analytics Hub, users can discover and search for listings that they have access to. Subscribers - * can view and subscribe to listings. When you subscribe to a listing, Analytics Hub creates a - * linked dataset in your project. - * - *

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
- *   DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
- *   DataExchange response = analyticsHubServiceClient.getDataExchange(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AnalyticsHubServiceSettings analyticsHubServiceSettings =
- *     AnalyticsHubServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AnalyticsHubServiceClient analyticsHubServiceClient =
- *     AnalyticsHubServiceClient.create(analyticsHubServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AnalyticsHubServiceSettings analyticsHubServiceSettings =
- *     AnalyticsHubServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AnalyticsHubServiceClient analyticsHubServiceClient =
- *     AnalyticsHubServiceClient.create(analyticsHubServiceSettings);
- * }
- * - *

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AnalyticsHubServiceSettings analyticsHubServiceSettings =
- *     AnalyticsHubServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             AnalyticsHubServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * AnalyticsHubServiceClient analyticsHubServiceClient =
- *     AnalyticsHubServiceClient.create(analyticsHubServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class AnalyticsHubServiceClient implements BackgroundResource { - private final AnalyticsHubServiceSettings settings; - private final AnalyticsHubServiceStub stub; - - /** Constructs an instance of AnalyticsHubServiceClient with default settings. */ - public static final AnalyticsHubServiceClient create() throws IOException { - return create(AnalyticsHubServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AnalyticsHubServiceClient, 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 AnalyticsHubServiceClient create(AnalyticsHubServiceSettings settings) - throws IOException { - return new AnalyticsHubServiceClient(settings); - } - - /** - * Constructs an instance of AnalyticsHubServiceClient, using the given stub for making calls. - * This is for advanced usage - prefer using create(AnalyticsHubServiceSettings). - */ - public static final AnalyticsHubServiceClient create(AnalyticsHubServiceStub stub) { - return new AnalyticsHubServiceClient(stub); - } - - /** - * Constructs an instance of AnalyticsHubServiceClient, 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 AnalyticsHubServiceClient(AnalyticsHubServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AnalyticsHubServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected AnalyticsHubServiceClient(AnalyticsHubServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AnalyticsHubServiceSettings getSettings() { - return settings; - } - - public AnalyticsHubServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (DataExchange element :
-   *       analyticsHubServiceClient.listDataExchanges(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the data exchanges. e.g. - * `projects/myproject/locations/US`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDataExchangesPagedResponse listDataExchanges(LocationName parent) { - ListDataExchangesRequest request = - ListDataExchangesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDataExchanges(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (DataExchange element :
-   *       analyticsHubServiceClient.listDataExchanges(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the data exchanges. e.g. - * `projects/myproject/locations/US`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDataExchangesPagedResponse listDataExchanges(String parent) { - ListDataExchangesRequest request = - ListDataExchangesRequest.newBuilder().setParent(parent).build(); - return listDataExchanges(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListDataExchangesRequest request =
-   *       ListDataExchangesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (DataExchange element :
-   *       analyticsHubServiceClient.listDataExchanges(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 ListDataExchangesPagedResponse listDataExchanges(ListDataExchangesRequest request) { - return listDataExchangesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListDataExchangesRequest request =
-   *       ListDataExchangesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.listDataExchangesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (DataExchange element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listDataExchangesPagedCallable() { - return stub.listDataExchangesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListDataExchangesRequest request =
-   *       ListDataExchangesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListDataExchangesResponse response =
-   *         analyticsHubServiceClient.listDataExchangesCallable().call(request);
-   *     for (DataExchange element : response.getDataExchangesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listDataExchangesCallable() { - return stub.listDataExchangesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges from projects in a given organization and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String organization = "organization1178922291";
-   *   for (DataExchange element :
-   *       analyticsHubServiceClient.listOrgDataExchanges(organization).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param organization Required. The organization resource path of the projects containing - * DataExchanges. e.g. `organizations/myorg/locations/US`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListOrgDataExchangesPagedResponse listOrgDataExchanges(String organization) { - ListOrgDataExchangesRequest request = - ListOrgDataExchangesRequest.newBuilder().setOrganization(organization).build(); - return listOrgDataExchanges(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges from projects in a given organization and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListOrgDataExchangesRequest request =
-   *       ListOrgDataExchangesRequest.newBuilder()
-   *           .setOrganization("organization1178922291")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (DataExchange element :
-   *       analyticsHubServiceClient.listOrgDataExchanges(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 ListOrgDataExchangesPagedResponse listOrgDataExchanges( - ListOrgDataExchangesRequest request) { - return listOrgDataExchangesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges from projects in a given organization and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListOrgDataExchangesRequest request =
-   *       ListOrgDataExchangesRequest.newBuilder()
-   *           .setOrganization("organization1178922291")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.listOrgDataExchangesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (DataExchange element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOrgDataExchangesPagedCallable() { - return stub.listOrgDataExchangesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all data exchanges from projects in a given organization and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListOrgDataExchangesRequest request =
-   *       ListOrgDataExchangesRequest.newBuilder()
-   *           .setOrganization("organization1178922291")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListOrgDataExchangesResponse response =
-   *         analyticsHubServiceClient.listOrgDataExchangesCallable().call(request);
-   *     for (DataExchange element : response.getDataExchangesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listOrgDataExchangesCallable() { - return stub.listOrgDataExchangesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
-   *   DataExchange response = analyticsHubServiceClient.getDataExchange(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the data exchange. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DataExchange getDataExchange(DataExchangeName name) { - GetDataExchangeRequest request = - GetDataExchangeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString();
-   *   DataExchange response = analyticsHubServiceClient.getDataExchange(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the data exchange. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DataExchange getDataExchange(String name) { - GetDataExchangeRequest request = GetDataExchangeRequest.newBuilder().setName(name).build(); - return getDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetDataExchangeRequest request =
-   *       GetDataExchangeRequest.newBuilder()
-   *           .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .build();
-   *   DataExchange response = analyticsHubServiceClient.getDataExchange(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 DataExchange getDataExchange(GetDataExchangeRequest request) { - return getDataExchangeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetDataExchangeRequest request =
-   *       GetDataExchangeRequest.newBuilder()
-   *           .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.getDataExchangeCallable().futureCall(request);
-   *   // Do something.
-   *   DataExchange response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getDataExchangeCallable() { - return stub.getDataExchangeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DataExchange dataExchange = DataExchange.newBuilder().build();
-   *   DataExchange response = analyticsHubServiceClient.createDataExchange(parent, dataExchange);
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the data exchange. e.g. - * `projects/myproject/locations/US`. - * @param dataExchange Required. The data exchange to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DataExchange createDataExchange(LocationName parent, DataExchange dataExchange) { - CreateDataExchangeRequest request = - CreateDataExchangeRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDataExchange(dataExchange) - .build(); - return createDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   DataExchange dataExchange = DataExchange.newBuilder().build();
-   *   DataExchange response = analyticsHubServiceClient.createDataExchange(parent, dataExchange);
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the data exchange. e.g. - * `projects/myproject/locations/US`. - * @param dataExchange Required. The data exchange to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DataExchange createDataExchange(String parent, DataExchange dataExchange) { - CreateDataExchangeRequest request = - CreateDataExchangeRequest.newBuilder() - .setParent(parent) - .setDataExchange(dataExchange) - .build(); - return createDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   CreateDataExchangeRequest request =
-   *       CreateDataExchangeRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setDataExchangeId("dataExchangeId783243752")
-   *           .setDataExchange(DataExchange.newBuilder().build())
-   *           .build();
-   *   DataExchange response = analyticsHubServiceClient.createDataExchange(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 DataExchange createDataExchange(CreateDataExchangeRequest request) { - return createDataExchangeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   CreateDataExchangeRequest request =
-   *       CreateDataExchangeRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setDataExchangeId("dataExchangeId783243752")
-   *           .setDataExchange(DataExchange.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.createDataExchangeCallable().futureCall(request);
-   *   // Do something.
-   *   DataExchange response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createDataExchangeCallable() { - return stub.createDataExchangeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DataExchange dataExchange = DataExchange.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   DataExchange response =
-   *       analyticsHubServiceClient.updateDataExchange(dataExchange, updateMask);
-   * }
-   * }
- * - * @param dataExchange Required. The data exchange to update. - * @param updateMask Required. Field mask specifies the fields to update in the data exchange - * resource. The fields specified in the `updateMask` are relative to the resource and are not - * a full request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DataExchange updateDataExchange(DataExchange dataExchange, FieldMask updateMask) { - UpdateDataExchangeRequest request = - UpdateDataExchangeRequest.newBuilder() - .setDataExchange(dataExchange) - .setUpdateMask(updateMask) - .build(); - return updateDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   UpdateDataExchangeRequest request =
-   *       UpdateDataExchangeRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setDataExchange(DataExchange.newBuilder().build())
-   *           .build();
-   *   DataExchange response = analyticsHubServiceClient.updateDataExchange(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 DataExchange updateDataExchange(UpdateDataExchangeRequest request) { - return updateDataExchangeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   UpdateDataExchangeRequest request =
-   *       UpdateDataExchangeRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setDataExchange(DataExchange.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.updateDataExchangeCallable().futureCall(request);
-   *   // Do something.
-   *   DataExchange response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateDataExchangeCallable() { - return stub.updateDataExchangeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
-   *   analyticsHubServiceClient.deleteDataExchange(name);
-   * }
-   * }
- * - * @param name Required. The full name of the data exchange resource that you want to delete. For - * example, `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDataExchange(DataExchangeName name) { - DeleteDataExchangeRequest request = - DeleteDataExchangeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString();
-   *   analyticsHubServiceClient.deleteDataExchange(name);
-   * }
-   * }
- * - * @param name Required. The full name of the data exchange resource that you want to delete. For - * example, `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDataExchange(String name) { - DeleteDataExchangeRequest request = - DeleteDataExchangeRequest.newBuilder().setName(name).build(); - deleteDataExchange(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DeleteDataExchangeRequest request =
-   *       DeleteDataExchangeRequest.newBuilder()
-   *           .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .build();
-   *   analyticsHubServiceClient.deleteDataExchange(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 deleteDataExchange(DeleteDataExchangeRequest request) { - deleteDataExchangeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an existing data exchange. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DeleteDataExchangeRequest request =
-   *       DeleteDataExchangeRequest.newBuilder()
-   *           .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.deleteDataExchangeCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteDataExchangeCallable() { - return stub.deleteDataExchangeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all listings in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
-   *   for (Listing element : analyticsHubServiceClient.listListings(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListListingsPagedResponse listListings(DataExchangeName parent) { - ListListingsRequest request = - ListListingsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listListings(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all listings in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString();
-   *   for (Listing element : analyticsHubServiceClient.listListings(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListListingsPagedResponse listListings(String parent) { - ListListingsRequest request = ListListingsRequest.newBuilder().setParent(parent).build(); - return listListings(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all listings in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListListingsRequest request =
-   *       ListListingsRequest.newBuilder()
-   *           .setParent(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Listing element : analyticsHubServiceClient.listListings(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 ListListingsPagedResponse listListings(ListListingsRequest request) { - return listListingsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all listings in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListListingsRequest request =
-   *       ListListingsRequest.newBuilder()
-   *           .setParent(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.listListingsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Listing element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listListingsPagedCallable() { - return stub.listListingsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all listings in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListListingsRequest request =
-   *       ListListingsRequest.newBuilder()
-   *           .setParent(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListListingsResponse response =
-   *         analyticsHubServiceClient.listListingsCallable().call(request);
-   *     for (Listing element : response.getListingsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listListingsCallable() { - return stub.listListingsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]");
-   *   Listing response = analyticsHubServiceClient.getListing(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Listing getListing(ListingName name) { - GetListingRequest request = - GetListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String name =
-   *       ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString();
-   *   Listing response = analyticsHubServiceClient.getListing(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Listing getListing(String name) { - GetListingRequest request = GetListingRequest.newBuilder().setName(name).build(); - return getListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetListingRequest request =
-   *       GetListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   Listing response = analyticsHubServiceClient.getListing(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 Listing getListing(GetListingRequest request) { - return getListingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetListingRequest request =
-   *       GetListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.getListingCallable().futureCall(request);
-   *   // Do something.
-   *   Listing response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getListingCallable() { - return stub.getListingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
-   *   Listing listing = Listing.newBuilder().build();
-   *   Listing response = analyticsHubServiceClient.createListing(parent, listing);
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @param listing Required. The listing to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Listing createListing(DataExchangeName parent, Listing listing) { - CreateListingRequest request = - CreateListingRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setListing(listing) - .build(); - return createListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString();
-   *   Listing listing = Listing.newBuilder().build();
-   *   Listing response = analyticsHubServiceClient.createListing(parent, listing);
-   * }
-   * }
- * - * @param parent Required. The parent resource path of the listing. e.g. - * `projects/myproject/locations/US/dataExchanges/123`. - * @param listing Required. The listing to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Listing createListing(String parent, Listing listing) { - CreateListingRequest request = - CreateListingRequest.newBuilder().setParent(parent).setListing(listing).build(); - return createListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   CreateListingRequest request =
-   *       CreateListingRequest.newBuilder()
-   *           .setParent(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setListingId("listingId-1215024449")
-   *           .setListing(Listing.newBuilder().build())
-   *           .build();
-   *   Listing response = analyticsHubServiceClient.createListing(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 Listing createListing(CreateListingRequest request) { - return createListingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   CreateListingRequest request =
-   *       CreateListingRequest.newBuilder()
-   *           .setParent(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setListingId("listingId-1215024449")
-   *           .setListing(Listing.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.createListingCallable().futureCall(request);
-   *   // Do something.
-   *   Listing response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createListingCallable() { - return stub.createListingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   Listing listing = Listing.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Listing response = analyticsHubServiceClient.updateListing(listing, updateMask);
-   * }
-   * }
- * - * @param listing Required. The listing to update. - * @param updateMask Required. Field mask specifies the fields to update in the listing resource. - * The fields specified in the `updateMask` are relative to the resource and are not a full - * request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Listing updateListing(Listing listing, FieldMask updateMask) { - UpdateListingRequest request = - UpdateListingRequest.newBuilder().setListing(listing).setUpdateMask(updateMask).build(); - return updateListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   UpdateListingRequest request =
-   *       UpdateListingRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setListing(Listing.newBuilder().build())
-   *           .build();
-   *   Listing response = analyticsHubServiceClient.updateListing(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 Listing updateListing(UpdateListingRequest request) { - return updateListingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   UpdateListingRequest request =
-   *       UpdateListingRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setListing(Listing.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.updateListingCallable().futureCall(request);
-   *   // Do something.
-   *   Listing response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateListingCallable() { - return stub.updateListingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]");
-   *   analyticsHubServiceClient.deleteListing(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the listing to delete. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteListing(ListingName name) { - DeleteListingRequest request = - DeleteListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String name =
-   *       ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString();
-   *   analyticsHubServiceClient.deleteListing(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the listing to delete. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteListing(String name) { - DeleteListingRequest request = DeleteListingRequest.newBuilder().setName(name).build(); - deleteListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DeleteListingRequest request =
-   *       DeleteListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   analyticsHubServiceClient.deleteListing(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 deleteListing(DeleteListingRequest request) { - deleteListingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a listing. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   DeleteListingRequest request =
-   *       DeleteListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.deleteListingCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteListingCallable() { - return stub.deleteListingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Subscribes to a listing. - * - *

Currently, with Analytics Hub, you can create listings that reference only BigQuery - * datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked - * dataset in the subscriber's project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]");
-   *   SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the listing that you want to subscribe to. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SubscribeListingResponse subscribeListing(ListingName name) { - SubscribeListingRequest request = - SubscribeListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return subscribeListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Subscribes to a listing. - * - *

Currently, with Analytics Hub, you can create listings that reference only BigQuery - * datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked - * dataset in the subscriber's project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   String name =
-   *       ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString();
-   *   SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the listing that you want to subscribe to. e.g. - * `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SubscribeListingResponse subscribeListing(String name) { - SubscribeListingRequest request = SubscribeListingRequest.newBuilder().setName(name).build(); - return subscribeListing(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Subscribes to a listing. - * - *

Currently, with Analytics Hub, you can create listings that reference only BigQuery - * datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked - * dataset in the subscriber's project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   SubscribeListingRequest request =
-   *       SubscribeListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(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 SubscribeListingResponse subscribeListing(SubscribeListingRequest request) { - return subscribeListingCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Subscribes to a listing. - * - *

Currently, with Analytics Hub, you can create listings that reference only BigQuery - * datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked - * dataset in the subscriber's project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   SubscribeListingRequest request =
-   *       SubscribeListingRequest.newBuilder()
-   *           .setName(
-   *               ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.subscribeListingCallable().futureCall(request);
-   *   // Do something.
-   *   SubscribeListingResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - subscribeListingCallable() { - return stub.subscribeListingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the IAM policy. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = analyticsHubServiceClient.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 IAM policy. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the IAM policy. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = analyticsHubServiceClient.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 IAM policy. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns the permissions that a caller has. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = analyticsHubServiceClient.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 permissions that a caller has. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsHubServiceClient.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 ListDataExchangesPagedResponse - extends AbstractPagedListResponse< - ListDataExchangesRequest, - ListDataExchangesResponse, - DataExchange, - ListDataExchangesPage, - ListDataExchangesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListDataExchangesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListDataExchangesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListDataExchangesPagedResponse(ListDataExchangesPage page) { - super(page, ListDataExchangesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListDataExchangesPage - extends AbstractPage< - ListDataExchangesRequest, - ListDataExchangesResponse, - DataExchange, - ListDataExchangesPage> { - - private ListDataExchangesPage( - PageContext context, - ListDataExchangesResponse response) { - super(context, response); - } - - private static ListDataExchangesPage createEmptyPage() { - return new ListDataExchangesPage(null, null); - } - - @Override - protected ListDataExchangesPage createPage( - PageContext context, - ListDataExchangesResponse response) { - return new ListDataExchangesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListDataExchangesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListDataExchangesRequest, - ListDataExchangesResponse, - DataExchange, - ListDataExchangesPage, - ListDataExchangesFixedSizeCollection> { - - private ListDataExchangesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListDataExchangesFixedSizeCollection createEmptyCollection() { - return new ListDataExchangesFixedSizeCollection(null, 0); - } - - @Override - protected ListDataExchangesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListDataExchangesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListOrgDataExchangesPagedResponse - extends AbstractPagedListResponse< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - DataExchange, - ListOrgDataExchangesPage, - ListOrgDataExchangesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListOrgDataExchangesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListOrgDataExchangesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListOrgDataExchangesPagedResponse(ListOrgDataExchangesPage page) { - super(page, ListOrgDataExchangesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListOrgDataExchangesPage - extends AbstractPage< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - DataExchange, - ListOrgDataExchangesPage> { - - private ListOrgDataExchangesPage( - PageContext - context, - ListOrgDataExchangesResponse response) { - super(context, response); - } - - private static ListOrgDataExchangesPage createEmptyPage() { - return new ListOrgDataExchangesPage(null, null); - } - - @Override - protected ListOrgDataExchangesPage createPage( - PageContext - context, - ListOrgDataExchangesResponse response) { - return new ListOrgDataExchangesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListOrgDataExchangesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - DataExchange, - ListOrgDataExchangesPage, - ListOrgDataExchangesFixedSizeCollection> { - - private ListOrgDataExchangesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListOrgDataExchangesFixedSizeCollection createEmptyCollection() { - return new ListOrgDataExchangesFixedSizeCollection(null, 0); - } - - @Override - protected ListOrgDataExchangesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListOrgDataExchangesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListListingsPagedResponse - extends AbstractPagedListResponse< - ListListingsRequest, - ListListingsResponse, - Listing, - ListListingsPage, - ListListingsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListListingsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListListingsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListListingsPagedResponse(ListListingsPage page) { - super(page, ListListingsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListListingsPage - extends AbstractPage { - - private ListListingsPage( - PageContext context, - ListListingsResponse response) { - super(context, response); - } - - private static ListListingsPage createEmptyPage() { - return new ListListingsPage(null, null); - } - - @Override - protected ListListingsPage createPage( - PageContext context, - ListListingsResponse response) { - return new ListListingsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListListingsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListListingsRequest, - ListListingsResponse, - Listing, - ListListingsPage, - ListListingsFixedSizeCollection> { - - private ListListingsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListListingsFixedSizeCollection createEmptyCollection() { - return new ListListingsFixedSizeCollection(null, 0); - } - - @Override - protected ListListingsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListListingsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceSettings.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceSettings.java deleted file mode 100644 index 6ca63a9a5b53..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceSettings.java +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.bigquery.analyticshub.v1.stub.AnalyticsHubServiceStubSettings; -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 AnalyticsHubServiceClient}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AnalyticsHubServiceSettings.Builder analyticsHubServiceSettingsBuilder =
- *     AnalyticsHubServiceSettings.newBuilder();
- * analyticsHubServiceSettingsBuilder
- *     .getDataExchangeSettings()
- *     .setRetrySettings(
- *         analyticsHubServiceSettingsBuilder
- *             .getDataExchangeSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AnalyticsHubServiceSettings analyticsHubServiceSettings =
- *     analyticsHubServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AnalyticsHubServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listDataExchanges. */ - public PagedCallSettings< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).listDataExchangesSettings(); - } - - /** Returns the object with the settings used for calls to listOrgDataExchanges. */ - public PagedCallSettings< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).listOrgDataExchangesSettings(); - } - - /** Returns the object with the settings used for calls to getDataExchange. */ - public UnaryCallSettings getDataExchangeSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).getDataExchangeSettings(); - } - - /** Returns the object with the settings used for calls to createDataExchange. */ - public UnaryCallSettings createDataExchangeSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).createDataExchangeSettings(); - } - - /** Returns the object with the settings used for calls to updateDataExchange. */ - public UnaryCallSettings updateDataExchangeSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).updateDataExchangeSettings(); - } - - /** Returns the object with the settings used for calls to deleteDataExchange. */ - public UnaryCallSettings deleteDataExchangeSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).deleteDataExchangeSettings(); - } - - /** Returns the object with the settings used for calls to listListings. */ - public PagedCallSettings - listListingsSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).listListingsSettings(); - } - - /** Returns the object with the settings used for calls to getListing. */ - public UnaryCallSettings getListingSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).getListingSettings(); - } - - /** Returns the object with the settings used for calls to createListing. */ - public UnaryCallSettings createListingSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).createListingSettings(); - } - - /** Returns the object with the settings used for calls to updateListing. */ - public UnaryCallSettings updateListingSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).updateListingSettings(); - } - - /** Returns the object with the settings used for calls to deleteListing. */ - public UnaryCallSettings deleteListingSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).deleteListingSettings(); - } - - /** Returns the object with the settings used for calls to subscribeListing. */ - public UnaryCallSettings - subscribeListingSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).subscribeListingSettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((AnalyticsHubServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final AnalyticsHubServiceSettings create(AnalyticsHubServiceStubSettings stub) - throws IOException { - return new AnalyticsHubServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AnalyticsHubServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AnalyticsHubServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AnalyticsHubServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AnalyticsHubServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AnalyticsHubServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AnalyticsHubServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AnalyticsHubServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AnalyticsHubServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AnalyticsHubServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(AnalyticsHubServiceStubSettings.newHttpJsonBuilder()); - } - - public AnalyticsHubServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AnalyticsHubServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listDataExchanges. */ - public PagedCallSettings.Builder< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings() { - return getStubSettingsBuilder().listDataExchangesSettings(); - } - - /** Returns the builder for the settings used for calls to listOrgDataExchanges. */ - public PagedCallSettings.Builder< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings() { - return getStubSettingsBuilder().listOrgDataExchangesSettings(); - } - - /** Returns the builder for the settings used for calls to getDataExchange. */ - public UnaryCallSettings.Builder - getDataExchangeSettings() { - return getStubSettingsBuilder().getDataExchangeSettings(); - } - - /** Returns the builder for the settings used for calls to createDataExchange. */ - public UnaryCallSettings.Builder - createDataExchangeSettings() { - return getStubSettingsBuilder().createDataExchangeSettings(); - } - - /** Returns the builder for the settings used for calls to updateDataExchange. */ - public UnaryCallSettings.Builder - updateDataExchangeSettings() { - return getStubSettingsBuilder().updateDataExchangeSettings(); - } - - /** Returns the builder for the settings used for calls to deleteDataExchange. */ - public UnaryCallSettings.Builder - deleteDataExchangeSettings() { - return getStubSettingsBuilder().deleteDataExchangeSettings(); - } - - /** Returns the builder for the settings used for calls to listListings. */ - public PagedCallSettings.Builder< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse> - listListingsSettings() { - return getStubSettingsBuilder().listListingsSettings(); - } - - /** Returns the builder for the settings used for calls to getListing. */ - public UnaryCallSettings.Builder getListingSettings() { - return getStubSettingsBuilder().getListingSettings(); - } - - /** Returns the builder for the settings used for calls to createListing. */ - public UnaryCallSettings.Builder createListingSettings() { - return getStubSettingsBuilder().createListingSettings(); - } - - /** Returns the builder for the settings used for calls to updateListing. */ - public UnaryCallSettings.Builder updateListingSettings() { - return getStubSettingsBuilder().updateListingSettings(); - } - - /** Returns the builder for the settings used for calls to deleteListing. */ - public UnaryCallSettings.Builder deleteListingSettings() { - return getStubSettingsBuilder().deleteListingSettings(); - } - - /** Returns the builder for the settings used for calls to subscribeListing. */ - public UnaryCallSettings.Builder - subscribeListingSettings() { - return getStubSettingsBuilder().subscribeListingSettings(); - } - - /** 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 setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public AnalyticsHubServiceSettings build() throws IOException { - return new AnalyticsHubServiceSettings(this); - } - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/package-info.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/package-info.java deleted file mode 100644 index 2afc00e913ba..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/package-info.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Analytics Hub API - * - *

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

======================= AnalyticsHubServiceClient ======================= - * - *

Service Description: The `AnalyticsHubService` API facilitates data sharing within and across - * organizations. It allows data providers to publish listings that reference shared datasets. With - * Analytics Hub, users can discover and search for listings that they have access to. Subscribers - * can view and subscribe to listings. When you subscribe to a listing, Analytics Hub creates a - * linked dataset in your project. - * - *

Sample for AnalyticsHubServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
- *   DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
- *   DataExchange response = analyticsHubServiceClient.getDataExchange(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.bigquery.analyticshub.v1; - -import javax.annotation.Generated; diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java deleted file mode 100644 index 732de2b8a2ee..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.DataExchange; -import com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.Listing; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse; -import com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest; -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 the AnalyticsHubService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class AnalyticsHubServiceStub implements BackgroundResource { - - public UnaryCallable - listDataExchangesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listDataExchangesPagedCallable()"); - } - - public UnaryCallable - listDataExchangesCallable() { - throw new UnsupportedOperationException("Not implemented: listDataExchangesCallable()"); - } - - public UnaryCallable - listOrgDataExchangesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listOrgDataExchangesPagedCallable()"); - } - - public UnaryCallable - listOrgDataExchangesCallable() { - throw new UnsupportedOperationException("Not implemented: listOrgDataExchangesCallable()"); - } - - public UnaryCallable getDataExchangeCallable() { - throw new UnsupportedOperationException("Not implemented: getDataExchangeCallable()"); - } - - public UnaryCallable createDataExchangeCallable() { - throw new UnsupportedOperationException("Not implemented: createDataExchangeCallable()"); - } - - public UnaryCallable updateDataExchangeCallable() { - throw new UnsupportedOperationException("Not implemented: updateDataExchangeCallable()"); - } - - public UnaryCallable deleteDataExchangeCallable() { - throw new UnsupportedOperationException("Not implemented: deleteDataExchangeCallable()"); - } - - public UnaryCallable listListingsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listListingsPagedCallable()"); - } - - public UnaryCallable listListingsCallable() { - throw new UnsupportedOperationException("Not implemented: listListingsCallable()"); - } - - public UnaryCallable getListingCallable() { - throw new UnsupportedOperationException("Not implemented: getListingCallable()"); - } - - public UnaryCallable createListingCallable() { - throw new UnsupportedOperationException("Not implemented: createListingCallable()"); - } - - public UnaryCallable updateListingCallable() { - throw new UnsupportedOperationException("Not implemented: updateListingCallable()"); - } - - public UnaryCallable deleteListingCallable() { - throw new UnsupportedOperationException("Not implemented: deleteListingCallable()"); - } - - public UnaryCallable - subscribeListingCallable() { - throw new UnsupportedOperationException("Not implemented: subscribeListingCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStubSettings.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStubSettings.java deleted file mode 100644 index 64bdbfb9212d..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStubSettings.java +++ /dev/null @@ -1,902 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.DataExchange; -import com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.Listing; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse; -import com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest; -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 AnalyticsHubServiceStub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AnalyticsHubServiceStubSettings.Builder analyticsHubServiceSettingsBuilder =
- *     AnalyticsHubServiceStubSettings.newBuilder();
- * analyticsHubServiceSettingsBuilder
- *     .getDataExchangeSettings()
- *     .setRetrySettings(
- *         analyticsHubServiceSettingsBuilder
- *             .getDataExchangeSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AnalyticsHubServiceStubSettings analyticsHubServiceSettings =
- *     analyticsHubServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AnalyticsHubServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/bigquery") - .add("https://www.googleapis.com/auth/cloud-platform") - .build(); - - private final PagedCallSettings< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings; - private final PagedCallSettings< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings; - private final UnaryCallSettings getDataExchangeSettings; - private final UnaryCallSettings - createDataExchangeSettings; - private final UnaryCallSettings - updateDataExchangeSettings; - private final UnaryCallSettings deleteDataExchangeSettings; - private final PagedCallSettings< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse> - listListingsSettings; - private final UnaryCallSettings getListingSettings; - private final UnaryCallSettings createListingSettings; - private final UnaryCallSettings updateListingSettings; - private final UnaryCallSettings deleteListingSettings; - private final UnaryCallSettings - subscribeListingSettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - private static final PagedListDescriptor< - ListDataExchangesRequest, ListDataExchangesResponse, DataExchange> - LIST_DATA_EXCHANGES_PAGE_STR_DESC = - new PagedListDescriptor< - ListDataExchangesRequest, ListDataExchangesResponse, DataExchange>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListDataExchangesRequest injectToken( - ListDataExchangesRequest payload, String token) { - return ListDataExchangesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListDataExchangesRequest injectPageSize( - ListDataExchangesRequest payload, int pageSize) { - return ListDataExchangesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListDataExchangesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListDataExchangesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListDataExchangesResponse payload) { - return payload.getDataExchangesList() == null - ? ImmutableList.of() - : payload.getDataExchangesList(); - } - }; - - private static final PagedListDescriptor< - ListOrgDataExchangesRequest, ListOrgDataExchangesResponse, DataExchange> - LIST_ORG_DATA_EXCHANGES_PAGE_STR_DESC = - new PagedListDescriptor< - ListOrgDataExchangesRequest, ListOrgDataExchangesResponse, DataExchange>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListOrgDataExchangesRequest injectToken( - ListOrgDataExchangesRequest payload, String token) { - return ListOrgDataExchangesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListOrgDataExchangesRequest injectPageSize( - ListOrgDataExchangesRequest payload, int pageSize) { - return ListOrgDataExchangesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListOrgDataExchangesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListOrgDataExchangesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListOrgDataExchangesResponse payload) { - return payload.getDataExchangesList() == null - ? ImmutableList.of() - : payload.getDataExchangesList(); - } - }; - - private static final PagedListDescriptor - LIST_LISTINGS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListListingsRequest injectToken(ListListingsRequest payload, String token) { - return ListListingsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListListingsRequest injectPageSize(ListListingsRequest payload, int pageSize) { - return ListListingsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListListingsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListListingsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListListingsResponse payload) { - return payload.getListingsList() == null - ? ImmutableList.of() - : payload.getListingsList(); - } - }; - - private static final PagedListResponseFactory< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - LIST_DATA_EXCHANGES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListDataExchangesRequest, - ListDataExchangesResponse, - ListDataExchangesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListDataExchangesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_DATA_EXCHANGES_PAGE_STR_DESC, request, context); - return ListDataExchangesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - LIST_ORG_DATA_EXCHANGES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListOrgDataExchangesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_ORG_DATA_EXCHANGES_PAGE_STR_DESC, request, context); - return ListOrgDataExchangesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse> - LIST_LISTINGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListListingsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_LISTINGS_PAGE_STR_DESC, request, context); - return ListListingsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listDataExchanges. */ - public PagedCallSettings< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings() { - return listDataExchangesSettings; - } - - /** Returns the object with the settings used for calls to listOrgDataExchanges. */ - public PagedCallSettings< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings() { - return listOrgDataExchangesSettings; - } - - /** Returns the object with the settings used for calls to getDataExchange. */ - public UnaryCallSettings getDataExchangeSettings() { - return getDataExchangeSettings; - } - - /** Returns the object with the settings used for calls to createDataExchange. */ - public UnaryCallSettings createDataExchangeSettings() { - return createDataExchangeSettings; - } - - /** Returns the object with the settings used for calls to updateDataExchange. */ - public UnaryCallSettings updateDataExchangeSettings() { - return updateDataExchangeSettings; - } - - /** Returns the object with the settings used for calls to deleteDataExchange. */ - public UnaryCallSettings deleteDataExchangeSettings() { - return deleteDataExchangeSettings; - } - - /** Returns the object with the settings used for calls to listListings. */ - public PagedCallSettings - listListingsSettings() { - return listListingsSettings; - } - - /** Returns the object with the settings used for calls to getListing. */ - public UnaryCallSettings getListingSettings() { - return getListingSettings; - } - - /** Returns the object with the settings used for calls to createListing. */ - public UnaryCallSettings createListingSettings() { - return createListingSettings; - } - - /** Returns the object with the settings used for calls to updateListing. */ - public UnaryCallSettings updateListingSettings() { - return updateListingSettings; - } - - /** Returns the object with the settings used for calls to deleteListing. */ - public UnaryCallSettings deleteListingSettings() { - return deleteListingSettings; - } - - /** Returns the object with the settings used for calls to subscribeListing. */ - public UnaryCallSettings - subscribeListingSettings() { - return subscribeListingSettings; - } - - /** 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 setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public AnalyticsHubServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAnalyticsHubServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonAnalyticsHubServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "analyticshub.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "analyticshub.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AnalyticsHubServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AnalyticsHubServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AnalyticsHubServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AnalyticsHubServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listDataExchangesSettings = settingsBuilder.listDataExchangesSettings().build(); - listOrgDataExchangesSettings = settingsBuilder.listOrgDataExchangesSettings().build(); - getDataExchangeSettings = settingsBuilder.getDataExchangeSettings().build(); - createDataExchangeSettings = settingsBuilder.createDataExchangeSettings().build(); - updateDataExchangeSettings = settingsBuilder.updateDataExchangeSettings().build(); - deleteDataExchangeSettings = settingsBuilder.deleteDataExchangeSettings().build(); - listListingsSettings = settingsBuilder.listListingsSettings().build(); - getListingSettings = settingsBuilder.getListingSettings().build(); - createListingSettings = settingsBuilder.createListingSettings().build(); - updateListingSettings = settingsBuilder.updateListingSettings().build(); - deleteListingSettings = settingsBuilder.deleteListingSettings().build(); - subscribeListingSettings = settingsBuilder.subscribeListingSettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for AnalyticsHubServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings; - private final PagedCallSettings.Builder< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings; - private final UnaryCallSettings.Builder - getDataExchangeSettings; - private final UnaryCallSettings.Builder - createDataExchangeSettings; - private final UnaryCallSettings.Builder - updateDataExchangeSettings; - private final UnaryCallSettings.Builder - deleteDataExchangeSettings; - private final PagedCallSettings.Builder< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse> - listListingsSettings; - private final UnaryCallSettings.Builder getListingSettings; - private final UnaryCallSettings.Builder createListingSettings; - private final UnaryCallSettings.Builder updateListingSettings; - private final UnaryCallSettings.Builder deleteListingSettings; - private final UnaryCallSettings.Builder - subscribeListingSettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - 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(1000L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listDataExchangesSettings = PagedCallSettings.newBuilder(LIST_DATA_EXCHANGES_PAGE_STR_FACT); - listOrgDataExchangesSettings = - PagedCallSettings.newBuilder(LIST_ORG_DATA_EXCHANGES_PAGE_STR_FACT); - getDataExchangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createDataExchangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateDataExchangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteDataExchangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listListingsSettings = PagedCallSettings.newBuilder(LIST_LISTINGS_PAGE_STR_FACT); - getListingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createListingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateListingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteListingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - subscribeListingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listDataExchangesSettings, - listOrgDataExchangesSettings, - getDataExchangeSettings, - createDataExchangeSettings, - updateDataExchangeSettings, - deleteDataExchangeSettings, - listListingsSettings, - getListingSettings, - createListingSettings, - updateListingSettings, - deleteListingSettings, - subscribeListingSettings, - getIamPolicySettings, - setIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(AnalyticsHubServiceStubSettings settings) { - super(settings); - - listDataExchangesSettings = settings.listDataExchangesSettings.toBuilder(); - listOrgDataExchangesSettings = settings.listOrgDataExchangesSettings.toBuilder(); - getDataExchangeSettings = settings.getDataExchangeSettings.toBuilder(); - createDataExchangeSettings = settings.createDataExchangeSettings.toBuilder(); - updateDataExchangeSettings = settings.updateDataExchangeSettings.toBuilder(); - deleteDataExchangeSettings = settings.deleteDataExchangeSettings.toBuilder(); - listListingsSettings = settings.listListingsSettings.toBuilder(); - getListingSettings = settings.getListingSettings.toBuilder(); - createListingSettings = settings.createListingSettings.toBuilder(); - updateListingSettings = settings.updateListingSettings.toBuilder(); - deleteListingSettings = settings.deleteListingSettings.toBuilder(); - subscribeListingSettings = settings.subscribeListingSettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listDataExchangesSettings, - listOrgDataExchangesSettings, - getDataExchangeSettings, - createDataExchangeSettings, - updateDataExchangeSettings, - deleteDataExchangeSettings, - listListingsSettings, - getListingSettings, - createListingSettings, - updateListingSettings, - deleteListingSettings, - subscribeListingSettings, - getIamPolicySettings, - setIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listDataExchangesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listOrgDataExchangesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getDataExchangeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createDataExchangeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateDataExchangeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteDataExchangeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listListingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getListingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createListingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateListingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteListingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .subscribeListingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listDataExchanges. */ - public PagedCallSettings.Builder< - ListDataExchangesRequest, ListDataExchangesResponse, ListDataExchangesPagedResponse> - listDataExchangesSettings() { - return listDataExchangesSettings; - } - - /** Returns the builder for the settings used for calls to listOrgDataExchanges. */ - public PagedCallSettings.Builder< - ListOrgDataExchangesRequest, - ListOrgDataExchangesResponse, - ListOrgDataExchangesPagedResponse> - listOrgDataExchangesSettings() { - return listOrgDataExchangesSettings; - } - - /** Returns the builder for the settings used for calls to getDataExchange. */ - public UnaryCallSettings.Builder - getDataExchangeSettings() { - return getDataExchangeSettings; - } - - /** Returns the builder for the settings used for calls to createDataExchange. */ - public UnaryCallSettings.Builder - createDataExchangeSettings() { - return createDataExchangeSettings; - } - - /** Returns the builder for the settings used for calls to updateDataExchange. */ - public UnaryCallSettings.Builder - updateDataExchangeSettings() { - return updateDataExchangeSettings; - } - - /** Returns the builder for the settings used for calls to deleteDataExchange. */ - public UnaryCallSettings.Builder - deleteDataExchangeSettings() { - return deleteDataExchangeSettings; - } - - /** Returns the builder for the settings used for calls to listListings. */ - public PagedCallSettings.Builder< - ListListingsRequest, ListListingsResponse, ListListingsPagedResponse> - listListingsSettings() { - return listListingsSettings; - } - - /** Returns the builder for the settings used for calls to getListing. */ - public UnaryCallSettings.Builder getListingSettings() { - return getListingSettings; - } - - /** Returns the builder for the settings used for calls to createListing. */ - public UnaryCallSettings.Builder createListingSettings() { - return createListingSettings; - } - - /** Returns the builder for the settings used for calls to updateListing. */ - public UnaryCallSettings.Builder updateListingSettings() { - return updateListingSettings; - } - - /** Returns the builder for the settings used for calls to deleteListing. */ - public UnaryCallSettings.Builder deleteListingSettings() { - return deleteListingSettings; - } - - /** Returns the builder for the settings used for calls to subscribeListing. */ - public UnaryCallSettings.Builder - subscribeListingSettings() { - return subscribeListingSettings; - } - - /** 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 setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public AnalyticsHubServiceStubSettings build() throws IOException { - return new AnalyticsHubServiceStubSettings(this); - } - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceCallableFactory.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceCallableFactory.java deleted file mode 100644 index 4db10ed31e2e..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AnalyticsHubService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcAnalyticsHubServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceStub.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceStub.java deleted file mode 100644 index b859f750b697..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/GrpcAnalyticsHubServiceStub.java +++ /dev/null @@ -1,665 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.DataExchange; -import com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.Listing; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse; -import com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest; -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.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AnalyticsHubService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcAnalyticsHubServiceStub extends AnalyticsHubServiceStub { - private static final MethodDescriptor - listDataExchangesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListDataExchanges") - .setRequestMarshaller( - ProtoUtils.marshaller(ListDataExchangesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListDataExchangesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listOrgDataExchangesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListOrgDataExchanges") - .setRequestMarshaller( - ProtoUtils.marshaller(ListOrgDataExchangesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListOrgDataExchangesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getDataExchangeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetDataExchange") - .setRequestMarshaller( - ProtoUtils.marshaller(GetDataExchangeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createDataExchangeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateDataExchangeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateDataExchangeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateDataExchange") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateDataExchangeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteDataExchangeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteDataExchange") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteDataExchangeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listListingsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListListings") - .setRequestMarshaller(ProtoUtils.marshaller(ListListingsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListListingsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getListingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetListing") - .setRequestMarshaller(ProtoUtils.marshaller(GetListingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createListingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateListing") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateListingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateListingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateListing") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateListingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteListingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteListing") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteListingRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - subscribeListingMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeListing") - .setRequestMarshaller( - ProtoUtils.marshaller(SubscribeListingRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SubscribeListingResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable - listDataExchangesCallable; - private final UnaryCallable - listDataExchangesPagedCallable; - private final UnaryCallable - listOrgDataExchangesCallable; - private final UnaryCallable - listOrgDataExchangesPagedCallable; - private final UnaryCallable getDataExchangeCallable; - private final UnaryCallable createDataExchangeCallable; - private final UnaryCallable updateDataExchangeCallable; - private final UnaryCallable deleteDataExchangeCallable; - private final UnaryCallable listListingsCallable; - private final UnaryCallable - listListingsPagedCallable; - private final UnaryCallable getListingCallable; - private final UnaryCallable createListingCallable; - private final UnaryCallable updateListingCallable; - private final UnaryCallable deleteListingCallable; - private final UnaryCallable - subscribeListingCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAnalyticsHubServiceStub create(AnalyticsHubServiceStubSettings settings) - throws IOException { - return new GrpcAnalyticsHubServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAnalyticsHubServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAnalyticsHubServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAnalyticsHubServiceStub, 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 GrpcAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcAnalyticsHubServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAnalyticsHubServiceStub, 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 GrpcAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listDataExchangesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listDataExchangesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listOrgDataExchangesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listOrgDataExchangesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("organization", String.valueOf(request.getOrganization())); - return params.build(); - }) - .build(); - GrpcCallSettings getDataExchangeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getDataExchangeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createDataExchangeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createDataExchangeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateDataExchangeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateDataExchangeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "data_exchange.name", String.valueOf(request.getDataExchange().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteDataExchangeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteDataExchangeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listListingsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listListingsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getListingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getListingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createListingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createListingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateListingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateListingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("listing.name", String.valueOf(request.getListing().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteListingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteListingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - subscribeListingTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(subscribeListingMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - - this.listDataExchangesCallable = - callableFactory.createUnaryCallable( - listDataExchangesTransportSettings, - settings.listDataExchangesSettings(), - clientContext); - this.listDataExchangesPagedCallable = - callableFactory.createPagedCallable( - listDataExchangesTransportSettings, - settings.listDataExchangesSettings(), - clientContext); - this.listOrgDataExchangesCallable = - callableFactory.createUnaryCallable( - listOrgDataExchangesTransportSettings, - settings.listOrgDataExchangesSettings(), - clientContext); - this.listOrgDataExchangesPagedCallable = - callableFactory.createPagedCallable( - listOrgDataExchangesTransportSettings, - settings.listOrgDataExchangesSettings(), - clientContext); - this.getDataExchangeCallable = - callableFactory.createUnaryCallable( - getDataExchangeTransportSettings, settings.getDataExchangeSettings(), clientContext); - this.createDataExchangeCallable = - callableFactory.createUnaryCallable( - createDataExchangeTransportSettings, - settings.createDataExchangeSettings(), - clientContext); - this.updateDataExchangeCallable = - callableFactory.createUnaryCallable( - updateDataExchangeTransportSettings, - settings.updateDataExchangeSettings(), - clientContext); - this.deleteDataExchangeCallable = - callableFactory.createUnaryCallable( - deleteDataExchangeTransportSettings, - settings.deleteDataExchangeSettings(), - clientContext); - this.listListingsCallable = - callableFactory.createUnaryCallable( - listListingsTransportSettings, settings.listListingsSettings(), clientContext); - this.listListingsPagedCallable = - callableFactory.createPagedCallable( - listListingsTransportSettings, settings.listListingsSettings(), clientContext); - this.getListingCallable = - callableFactory.createUnaryCallable( - getListingTransportSettings, settings.getListingSettings(), clientContext); - this.createListingCallable = - callableFactory.createUnaryCallable( - createListingTransportSettings, settings.createListingSettings(), clientContext); - this.updateListingCallable = - callableFactory.createUnaryCallable( - updateListingTransportSettings, settings.updateListingSettings(), clientContext); - this.deleteListingCallable = - callableFactory.createUnaryCallable( - deleteListingTransportSettings, settings.deleteListingSettings(), clientContext); - this.subscribeListingCallable = - callableFactory.createUnaryCallable( - subscribeListingTransportSettings, settings.subscribeListingSettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - listDataExchangesCallable() { - return listDataExchangesCallable; - } - - @Override - public UnaryCallable - listDataExchangesPagedCallable() { - return listDataExchangesPagedCallable; - } - - @Override - public UnaryCallable - listOrgDataExchangesCallable() { - return listOrgDataExchangesCallable; - } - - @Override - public UnaryCallable - listOrgDataExchangesPagedCallable() { - return listOrgDataExchangesPagedCallable; - } - - @Override - public UnaryCallable getDataExchangeCallable() { - return getDataExchangeCallable; - } - - @Override - public UnaryCallable createDataExchangeCallable() { - return createDataExchangeCallable; - } - - @Override - public UnaryCallable updateDataExchangeCallable() { - return updateDataExchangeCallable; - } - - @Override - public UnaryCallable deleteDataExchangeCallable() { - return deleteDataExchangeCallable; - } - - @Override - public UnaryCallable listListingsCallable() { - return listListingsCallable; - } - - @Override - public UnaryCallable listListingsPagedCallable() { - return listListingsPagedCallable; - } - - @Override - public UnaryCallable getListingCallable() { - return getListingCallable; - } - - @Override - public UnaryCallable createListingCallable() { - return createListingCallable; - } - - @Override - public UnaryCallable updateListingCallable() { - return updateListingCallable; - } - - @Override - public UnaryCallable deleteListingCallable() { - return deleteListingCallable; - } - - @Override - public UnaryCallable - subscribeListingCallable() { - return subscribeListingCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceCallableFactory.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceCallableFactory.java deleted file mode 100644 index 6742540810fa..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the AnalyticsHubService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonAnalyticsHubServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceStub.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceStub.java deleted file mode 100644 index 860912baac98..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/HttpJsonAnalyticsHubServiceStub.java +++ /dev/null @@ -1,1013 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1.stub; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.DataExchange; -import com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.GetListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest; -import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse; -import com.google.cloud.bigquery.analyticshub.v1.Listing; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest; -import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse; -import com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest; -import com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest; -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.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the AnalyticsHubService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonAnalyticsHubServiceStub extends AnalyticsHubServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - listDataExchangesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListDataExchanges") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/dataExchanges", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListDataExchangesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListOrgDataExchangesRequest, ListOrgDataExchangesResponse> - listOrgDataExchangesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListOrgDataExchanges") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{organization=organizations/*/locations/*}/dataExchanges", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "organization", request.getOrganization()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListOrgDataExchangesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getDataExchangeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetDataExchange") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/dataExchanges/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataExchange.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createDataExchangeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/dataExchanges", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "dataExchangeId", request.getDataExchangeId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("dataExchange", request.getDataExchange(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataExchange.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateDataExchangeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateDataExchange") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{dataExchange.name=projects/*/locations/*/dataExchanges/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "dataExchange.name", request.getDataExchange().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("dataExchange", request.getDataExchange(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataExchange.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteDataExchangeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteDataExchange") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/dataExchanges/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listListingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListListings") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListListingsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getListingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetListing") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.

newBuilder() - .setDefaultInstance(Listing.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createListingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateListing") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "listingId", request.getListingId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("listing", request.getListing(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Listing.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateListingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateListing") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "listing.name", request.getListing().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("listing", request.getListing(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Listing.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteListingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteListing") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - subscribeListingMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeListing") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SubscribeListingResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable - listDataExchangesCallable; - private final UnaryCallable - listDataExchangesPagedCallable; - private final UnaryCallable - listOrgDataExchangesCallable; - private final UnaryCallable - listOrgDataExchangesPagedCallable; - private final UnaryCallable getDataExchangeCallable; - private final UnaryCallable createDataExchangeCallable; - private final UnaryCallable updateDataExchangeCallable; - private final UnaryCallable deleteDataExchangeCallable; - private final UnaryCallable listListingsCallable; - private final UnaryCallable - listListingsPagedCallable; - private final UnaryCallable getListingCallable; - private final UnaryCallable createListingCallable; - private final UnaryCallable updateListingCallable; - private final UnaryCallable deleteListingCallable; - private final UnaryCallable - subscribeListingCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonAnalyticsHubServiceStub create( - AnalyticsHubServiceStubSettings settings) throws IOException { - return new HttpJsonAnalyticsHubServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonAnalyticsHubServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonAnalyticsHubServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonAnalyticsHubServiceStub, 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 HttpJsonAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonAnalyticsHubServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonAnalyticsHubServiceStub, 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 HttpJsonAnalyticsHubServiceStub( - AnalyticsHubServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - listDataExchangesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listDataExchangesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listOrgDataExchangesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listOrgDataExchangesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getDataExchangeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getDataExchangeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createDataExchangeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createDataExchangeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateDataExchangeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateDataExchangeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteDataExchangeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteDataExchangeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listListingsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listListingsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getListingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getListingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createListingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createListingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateListingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateListingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteListingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteListingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - subscribeListingTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(subscribeListingMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listDataExchangesCallable = - callableFactory.createUnaryCallable( - listDataExchangesTransportSettings, - settings.listDataExchangesSettings(), - clientContext); - this.listDataExchangesPagedCallable = - callableFactory.createPagedCallable( - listDataExchangesTransportSettings, - settings.listDataExchangesSettings(), - clientContext); - this.listOrgDataExchangesCallable = - callableFactory.createUnaryCallable( - listOrgDataExchangesTransportSettings, - settings.listOrgDataExchangesSettings(), - clientContext); - this.listOrgDataExchangesPagedCallable = - callableFactory.createPagedCallable( - listOrgDataExchangesTransportSettings, - settings.listOrgDataExchangesSettings(), - clientContext); - this.getDataExchangeCallable = - callableFactory.createUnaryCallable( - getDataExchangeTransportSettings, settings.getDataExchangeSettings(), clientContext); - this.createDataExchangeCallable = - callableFactory.createUnaryCallable( - createDataExchangeTransportSettings, - settings.createDataExchangeSettings(), - clientContext); - this.updateDataExchangeCallable = - callableFactory.createUnaryCallable( - updateDataExchangeTransportSettings, - settings.updateDataExchangeSettings(), - clientContext); - this.deleteDataExchangeCallable = - callableFactory.createUnaryCallable( - deleteDataExchangeTransportSettings, - settings.deleteDataExchangeSettings(), - clientContext); - this.listListingsCallable = - callableFactory.createUnaryCallable( - listListingsTransportSettings, settings.listListingsSettings(), clientContext); - this.listListingsPagedCallable = - callableFactory.createPagedCallable( - listListingsTransportSettings, settings.listListingsSettings(), clientContext); - this.getListingCallable = - callableFactory.createUnaryCallable( - getListingTransportSettings, settings.getListingSettings(), clientContext); - this.createListingCallable = - callableFactory.createUnaryCallable( - createListingTransportSettings, settings.createListingSettings(), clientContext); - this.updateListingCallable = - callableFactory.createUnaryCallable( - updateListingTransportSettings, settings.updateListingSettings(), clientContext); - this.deleteListingCallable = - callableFactory.createUnaryCallable( - deleteListingTransportSettings, settings.deleteListingSettings(), clientContext); - this.subscribeListingCallable = - callableFactory.createUnaryCallable( - subscribeListingTransportSettings, settings.subscribeListingSettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listDataExchangesMethodDescriptor); - methodDescriptors.add(listOrgDataExchangesMethodDescriptor); - methodDescriptors.add(getDataExchangeMethodDescriptor); - methodDescriptors.add(createDataExchangeMethodDescriptor); - methodDescriptors.add(updateDataExchangeMethodDescriptor); - methodDescriptors.add(deleteDataExchangeMethodDescriptor); - methodDescriptors.add(listListingsMethodDescriptor); - methodDescriptors.add(getListingMethodDescriptor); - methodDescriptors.add(createListingMethodDescriptor); - methodDescriptors.add(updateListingMethodDescriptor); - methodDescriptors.add(deleteListingMethodDescriptor); - methodDescriptors.add(subscribeListingMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable - listDataExchangesCallable() { - return listDataExchangesCallable; - } - - @Override - public UnaryCallable - listDataExchangesPagedCallable() { - return listDataExchangesPagedCallable; - } - - @Override - public UnaryCallable - listOrgDataExchangesCallable() { - return listOrgDataExchangesCallable; - } - - @Override - public UnaryCallable - listOrgDataExchangesPagedCallable() { - return listOrgDataExchangesPagedCallable; - } - - @Override - public UnaryCallable getDataExchangeCallable() { - return getDataExchangeCallable; - } - - @Override - public UnaryCallable createDataExchangeCallable() { - return createDataExchangeCallable; - } - - @Override - public UnaryCallable updateDataExchangeCallable() { - return updateDataExchangeCallable; - } - - @Override - public UnaryCallable deleteDataExchangeCallable() { - return deleteDataExchangeCallable; - } - - @Override - public UnaryCallable listListingsCallable() { - return listListingsCallable; - } - - @Override - public UnaryCallable listListingsPagedCallable() { - return listListingsPagedCallable; - } - - @Override - public UnaryCallable getListingCallable() { - return getListingCallable; - } - - @Override - public UnaryCallable createListingCallable() { - return createListingCallable; - } - - @Override - public UnaryCallable updateListingCallable() { - return updateListingCallable; - } - - @Override - public UnaryCallable deleteListingCallable() { - return deleteListingCallable; - } - - @Override - public UnaryCallable - subscribeListingCallable() { - return subscribeListingCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientHttpJsonTest.java b/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientHttpJsonTest.java deleted file mode 100644 index 0a0462f1bfd9..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientHttpJsonTest.java +++ /dev/null @@ -1,1342 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.bigquery.analyticshub.v1.stub.HttpJsonAnalyticsHubServiceStub; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -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.ByteString; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AnalyticsHubServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static AnalyticsHubServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonAnalyticsHubServiceStub.getMethodDescriptors(), - AnalyticsHubServiceSettings.getDefaultEndpoint()); - AnalyticsHubServiceSettings settings = - AnalyticsHubServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - AnalyticsHubServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AnalyticsHubServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listDataExchangesTest() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListDataExchangesResponse expectedResponse = - ListDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDataExchangesPagedResponse pagedListResponse = client.listDataExchanges(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDataExchangesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDataExchanges(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDataExchangesTest2() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListDataExchangesResponse expectedResponse = - ListDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListDataExchangesPagedResponse pagedListResponse = client.listDataExchanges(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDataExchangesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listDataExchanges(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOrgDataExchangesTest() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListOrgDataExchangesResponse expectedResponse = - ListOrgDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String organization = "organizations/organization-686/locations/location-686"; - - ListOrgDataExchangesPagedResponse pagedListResponse = client.listOrgDataExchanges(organization); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listOrgDataExchangesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String organization = "organizations/organization-686/locations/location-686"; - client.listOrgDataExchanges(organization); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - DataExchange actualResponse = client.getDataExchange(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDataExchangeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.getDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDataExchangeTest2() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1196/locations/location-1196/dataExchanges/dataExchange-1196"; - - DataExchange actualResponse = client.getDataExchange(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDataExchangeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1196/locations/location-1196/dataExchanges/dataExchange-1196"; - client.getDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataExchange dataExchange = DataExchange.newBuilder().build(); - - DataExchange actualResponse = client.createDataExchange(parent, dataExchange); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDataExchangeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataExchange dataExchange = DataExchange.newBuilder().build(); - client.createDataExchange(parent, dataExchange); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDataExchangeTest2() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - DataExchange dataExchange = DataExchange.newBuilder().build(); - - DataExchange actualResponse = client.createDataExchange(parent, dataExchange); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDataExchangeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - DataExchange dataExchange = DataExchange.newBuilder().build(); - client.createDataExchange(parent, dataExchange); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - DataExchange dataExchange = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DataExchange actualResponse = client.updateDataExchange(dataExchange, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateDataExchangeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DataExchange dataExchange = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataExchange(dataExchange, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDataExchangeTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - client.deleteDataExchange(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDataExchangeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.deleteDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDataExchangeTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-1196/locations/location-1196/dataExchanges/dataExchange-1196"; - - client.deleteDataExchange(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDataExchangeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-1196/locations/location-1196/dataExchanges/dataExchange-1196"; - client.deleteDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listListingsTest() throws Exception { - Listing responsesElement = Listing.newBuilder().build(); - ListListingsResponse expectedResponse = - ListListingsResponse.newBuilder() - .setNextPageToken("") - .addAllListings(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - ListListingsPagedResponse pagedListResponse = client.listListings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListingsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listListingsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.listListings(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listListingsTest2() throws Exception { - Listing responsesElement = Listing.newBuilder().build(); - ListListingsResponse expectedResponse = - ListListingsResponse.newBuilder() - .setNextPageToken("") - .addAllListings(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4709/locations/location-4709/dataExchanges/dataExchange-4709"; - - ListListingsPagedResponse pagedListResponse = client.listListings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListingsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listListingsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = - "projects/project-4709/locations/location-4709/dataExchanges/dataExchange-4709"; - client.listListings(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - Listing actualResponse = client.getListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getListingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.getListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getListingTest2() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - - Listing actualResponse = client.getListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getListingExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - client.getListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockService.addResponse(expectedResponse); - - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - Listing listing = Listing.newBuilder().build(); - - Listing actualResponse = client.createListing(parent, listing); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createListingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - Listing listing = Listing.newBuilder().build(); - client.createListing(parent, listing); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createListingTest2() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4709/locations/location-4709/dataExchanges/dataExchange-4709"; - Listing listing = Listing.newBuilder().build(); - - Listing actualResponse = client.createListing(parent, listing); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createListingExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = - "projects/project-4709/locations/location-4709/dataExchanges/dataExchange-4709"; - Listing listing = Listing.newBuilder().build(); - client.createListing(parent, listing); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockService.addResponse(expectedResponse); - - Listing listing = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Listing actualResponse = client.updateListing(listing, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateListingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Listing listing = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateListing(listing, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteListingTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - client.deleteListing(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteListingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.deleteListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteListingTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - - client.deleteListing(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteListingExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - client.deleteListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void subscribeListingTest() throws Exception { - SubscribeListingResponse expectedResponse = SubscribeListingResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - SubscribeListingResponse actualResponse = client.subscribeListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void subscribeListingExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.subscribeListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void subscribeListingTest2() throws Exception { - SubscribeListingResponse expectedResponse = SubscribeListingResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - - SubscribeListingResponse actualResponse = client.subscribeListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void subscribeListingExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-9891/locations/location-9891/dataExchanges/dataExchange-9891/listings/listing-9891"; - client.subscribeListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientTest.java b/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientTest.java deleted file mode 100644 index 0ad602758523..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceClientTest.java +++ /dev/null @@ -1,1158 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1; - -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse; -import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -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.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AnalyticsHubServiceClientTest { - private static MockAnalyticsHubService mockAnalyticsHubService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AnalyticsHubServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAnalyticsHubService = new MockAnalyticsHubService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAnalyticsHubService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AnalyticsHubServiceSettings settings = - AnalyticsHubServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AnalyticsHubServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listDataExchangesTest() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListDataExchangesResponse expectedResponse = - ListDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDataExchangesPagedResponse pagedListResponse = client.listDataExchanges(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDataExchangesRequest actualRequest = ((ListDataExchangesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDataExchangesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDataExchanges(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDataExchangesTest2() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListDataExchangesResponse expectedResponse = - ListDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListDataExchangesPagedResponse pagedListResponse = client.listDataExchanges(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDataExchangesRequest actualRequest = ((ListDataExchangesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDataExchangesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listDataExchanges(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listOrgDataExchangesTest() throws Exception { - DataExchange responsesElement = DataExchange.newBuilder().build(); - ListOrgDataExchangesResponse expectedResponse = - ListOrgDataExchangesResponse.newBuilder() - .setNextPageToken("") - .addAllDataExchanges(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String organization = "organization1178922291"; - - ListOrgDataExchangesPagedResponse pagedListResponse = client.listOrgDataExchanges(organization); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataExchangesList().get(0), resources.get(0)); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListOrgDataExchangesRequest actualRequest = - ((ListOrgDataExchangesRequest) actualRequests.get(0)); - - Assert.assertEquals(organization, actualRequest.getOrganization()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listOrgDataExchangesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String organization = "organization1178922291"; - client.listOrgDataExchanges(organization); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - DataExchange actualResponse = client.getDataExchange(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDataExchangeRequest actualRequest = ((GetDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDataExchangeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.getDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDataExchangeTest2() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String name = "name3373707"; - - DataExchange actualResponse = client.getDataExchange(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDataExchangeRequest actualRequest = ((GetDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDataExchangeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String name = "name3373707"; - client.getDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataExchange dataExchange = DataExchange.newBuilder().build(); - - DataExchange actualResponse = client.createDataExchange(parent, dataExchange); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDataExchangeRequest actualRequest = ((CreateDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(dataExchange, actualRequest.getDataExchange()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDataExchangeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DataExchange dataExchange = DataExchange.newBuilder().build(); - client.createDataExchange(parent, dataExchange); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDataExchangeTest2() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - DataExchange dataExchange = DataExchange.newBuilder().build(); - - DataExchange actualResponse = client.createDataExchange(parent, dataExchange); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDataExchangeRequest actualRequest = ((CreateDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(dataExchange, actualRequest.getDataExchange()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDataExchangeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String parent = "parent-995424086"; - DataExchange dataExchange = DataExchange.newBuilder().build(); - client.createDataExchange(parent, dataExchange); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDataExchangeTest() throws Exception { - DataExchange expectedResponse = - DataExchange.newBuilder() - .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setListingCount(-1101038700) - .setIcon(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - DataExchange dataExchange = DataExchange.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DataExchange actualResponse = client.updateDataExchange(dataExchange, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateDataExchangeRequest actualRequest = ((UpdateDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(dataExchange, actualRequest.getDataExchange()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateDataExchangeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - DataExchange dataExchange = DataExchange.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataExchange(dataExchange, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDataExchangeTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - client.deleteDataExchange(name); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDataExchangeRequest actualRequest = ((DeleteDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDataExchangeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.deleteDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDataExchangeTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteDataExchange(name); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDataExchangeRequest actualRequest = ((DeleteDataExchangeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDataExchangeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String name = "name3373707"; - client.deleteDataExchange(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listListingsTest() throws Exception { - Listing responsesElement = Listing.newBuilder().build(); - ListListingsResponse expectedResponse = - ListListingsResponse.newBuilder() - .setNextPageToken("") - .addAllListings(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - - ListListingsPagedResponse pagedListResponse = client.listListings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListingsList().get(0), resources.get(0)); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListListingsRequest actualRequest = ((ListListingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listListingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - client.listListings(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listListingsTest2() throws Exception { - Listing responsesElement = Listing.newBuilder().build(); - ListListingsResponse expectedResponse = - ListListingsResponse.newBuilder() - .setNextPageToken("") - .addAllListings(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListListingsPagedResponse pagedListResponse = client.listListings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getListingsList().get(0), resources.get(0)); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListListingsRequest actualRequest = ((ListListingsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listListingsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listListings(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - Listing actualResponse = client.getListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetListingRequest actualRequest = ((GetListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getListingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.getListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getListingTest2() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String name = "name3373707"; - - Listing actualResponse = client.getListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetListingRequest actualRequest = ((GetListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getListingExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String name = "name3373707"; - client.getListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - Listing listing = Listing.newBuilder().build(); - - Listing actualResponse = client.createListing(parent, listing); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateListingRequest actualRequest = ((CreateListingRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(listing, actualRequest.getListing()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createListingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); - Listing listing = Listing.newBuilder().build(); - client.createListing(parent, listing); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createListingTest2() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Listing listing = Listing.newBuilder().build(); - - Listing actualResponse = client.createListing(parent, listing); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateListingRequest actualRequest = ((CreateListingRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(listing, actualRequest.getListing()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createListingExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String parent = "parent-995424086"; - Listing listing = Listing.newBuilder().build(); - client.createListing(parent, listing); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateListingTest() throws Exception { - Listing expectedResponse = - Listing.newBuilder() - .setName( - ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setPrimaryContact("primaryContact-532068418") - .setDocumentation("documentation1587405498") - .setIcon(ByteString.EMPTY) - .setDataProvider(DataProvider.newBuilder().build()) - .addAllCategories(new ArrayList()) - .setPublisher(Publisher.newBuilder().build()) - .setRequestAccess("requestAccess871967955") - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - Listing listing = Listing.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Listing actualResponse = client.updateListing(listing, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateListingRequest actualRequest = ((UpdateListingRequest) actualRequests.get(0)); - - Assert.assertEquals(listing, actualRequest.getListing()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateListingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - Listing listing = Listing.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateListing(listing, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteListingTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - client.deleteListing(name); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteListingRequest actualRequest = ((DeleteListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteListingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.deleteListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteListingTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteListing(name); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteListingRequest actualRequest = ((DeleteListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteListingExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String name = "name3373707"; - client.deleteListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void subscribeListingTest() throws Exception { - SubscribeListingResponse expectedResponse = SubscribeListingResponse.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - - SubscribeListingResponse actualResponse = client.subscribeListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SubscribeListingRequest actualRequest = ((SubscribeListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void subscribeListingExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); - client.subscribeListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void subscribeListingTest2() throws Exception { - SubscribeListingResponse expectedResponse = SubscribeListingResponse.newBuilder().build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - String name = "name3373707"; - - SubscribeListingResponse actualResponse = client.subscribeListing(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SubscribeListingRequest actualRequest = ((SubscribeListingRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void subscribeListingExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - String name = "name3373707"; - client.subscribeListing(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockAnalyticsHubService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsHubService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsHubService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubService.java b/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubService.java deleted file mode 100644 index 2f5e4997691b..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.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; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAnalyticsHubService implements MockGrpcService { - private final MockAnalyticsHubServiceImpl serviceImpl; - - public MockAnalyticsHubService() { - serviceImpl = new MockAnalyticsHubServiceImpl(); - } - - @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/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubServiceImpl.java b/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubServiceImpl.java deleted file mode 100644 index 8696b8ddc63f..000000000000 --- a/java-analyticshub/google-cloud-analyticshub/src/test/java/com/google/cloud/bigquery/analyticshub/v1/MockAnalyticsHubServiceImpl.java +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceGrpc.AnalyticsHubServiceImplBase; -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; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAnalyticsHubServiceImpl extends AnalyticsHubServiceImplBase { - private List requests; - private Queue responses; - - public MockAnalyticsHubServiceImpl() { - 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 listDataExchanges( - ListDataExchangesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListDataExchangesResponse) { - requests.add(request); - responseObserver.onNext(((ListDataExchangesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListDataExchanges, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListDataExchangesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listOrgDataExchanges( - ListOrgDataExchangesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListOrgDataExchangesResponse) { - requests.add(request); - responseObserver.onNext(((ListOrgDataExchangesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListOrgDataExchanges, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListOrgDataExchangesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getDataExchange( - GetDataExchangeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DataExchange) { - requests.add(request); - responseObserver.onNext(((DataExchange) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetDataExchange, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DataExchange.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createDataExchange( - CreateDataExchangeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DataExchange) { - requests.add(request); - responseObserver.onNext(((DataExchange) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateDataExchange, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DataExchange.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateDataExchange( - UpdateDataExchangeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DataExchange) { - requests.add(request); - responseObserver.onNext(((DataExchange) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateDataExchange, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DataExchange.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteDataExchange( - DeleteDataExchangeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteDataExchange, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listListings( - ListListingsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListListingsResponse) { - requests.add(request); - responseObserver.onNext(((ListListingsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListListings, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListListingsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getListing(GetListingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Listing) { - requests.add(request); - responseObserver.onNext(((Listing) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetListing, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Listing.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createListing( - CreateListingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Listing) { - requests.add(request); - responseObserver.onNext(((Listing) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateListing, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Listing.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateListing( - UpdateListingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Listing) { - requests.add(request); - responseObserver.onNext(((Listing) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateListing, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Listing.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteListing(DeleteListingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteListing, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void subscribeListing( - SubscribeListingRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SubscribeListingResponse) { - requests.add(request); - responseObserver.onNext(((SubscribeListingResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SubscribeListing, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SubscribeListingResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - 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( - String.format( - "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - 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( - String.format( - "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void testIamPermissions( - TestIamPermissionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - 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( - String.format( - "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - TestIamPermissionsResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-analyticshub/grpc-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceGrpc.java b/java-analyticshub/grpc-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceGrpc.java deleted file mode 100644 index 34b7294f7bf4..000000000000 --- a/java-analyticshub/grpc-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubServiceGrpc.java +++ /dev/null @@ -1,2087 +0,0 @@ -/* - * 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.bigquery.analyticshub.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The `AnalyticsHubService` API facilitates data sharing within and across
- * organizations. It allows data providers to publish listings that reference
- * shared datasets. With Analytics Hub, users can discover and search for
- * listings that they have access to. Subscribers can view and subscribe to
- * listings. When you subscribe to a listing, Analytics Hub creates a linked
- * dataset in your project.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AnalyticsHubServiceGrpc { - - private AnalyticsHubServiceGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.bigquery.analyticshub.v1.AnalyticsHubService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - getListDataExchangesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDataExchanges", - requestType = com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - getListDataExchangesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - getListDataExchangesMethod; - if ((getListDataExchangesMethod = AnalyticsHubServiceGrpc.getListDataExchangesMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getListDataExchangesMethod = AnalyticsHubServiceGrpc.getListDataExchangesMethod) - == null) { - AnalyticsHubServiceGrpc.getListDataExchangesMethod = - getListDataExchangesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataExchanges")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("ListDataExchanges")) - .build(); - } - } - } - return getListDataExchangesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - getListOrgDataExchangesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListOrgDataExchanges", - requestType = com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - getListOrgDataExchangesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - getListOrgDataExchangesMethod; - if ((getListOrgDataExchangesMethod = AnalyticsHubServiceGrpc.getListOrgDataExchangesMethod) - == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getListOrgDataExchangesMethod = AnalyticsHubServiceGrpc.getListOrgDataExchangesMethod) - == null) { - AnalyticsHubServiceGrpc.getListOrgDataExchangesMethod = - getListOrgDataExchangesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListOrgDataExchanges")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("ListOrgDataExchanges")) - .build(); - } - } - } - return getListOrgDataExchangesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getGetDataExchangeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDataExchange", - requestType = com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.DataExchange.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getGetDataExchangeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getGetDataExchangeMethod; - if ((getGetDataExchangeMethod = AnalyticsHubServiceGrpc.getGetDataExchangeMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getGetDataExchangeMethod = AnalyticsHubServiceGrpc.getGetDataExchangeMethod) == null) { - AnalyticsHubServiceGrpc.getGetDataExchangeMethod = - getGetDataExchangeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataExchange")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.DataExchange - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("GetDataExchange")) - .build(); - } - } - } - return getGetDataExchangeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getCreateDataExchangeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateDataExchange", - requestType = com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.DataExchange.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getCreateDataExchangeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getCreateDataExchangeMethod; - if ((getCreateDataExchangeMethod = AnalyticsHubServiceGrpc.getCreateDataExchangeMethod) - == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getCreateDataExchangeMethod = AnalyticsHubServiceGrpc.getCreateDataExchangeMethod) - == null) { - AnalyticsHubServiceGrpc.getCreateDataExchangeMethod = - getCreateDataExchangeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataExchange")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.DataExchange - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("CreateDataExchange")) - .build(); - } - } - } - return getCreateDataExchangeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getUpdateDataExchangeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateDataExchange", - requestType = com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.DataExchange.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getUpdateDataExchangeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getUpdateDataExchangeMethod; - if ((getUpdateDataExchangeMethod = AnalyticsHubServiceGrpc.getUpdateDataExchangeMethod) - == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getUpdateDataExchangeMethod = AnalyticsHubServiceGrpc.getUpdateDataExchangeMethod) - == null) { - AnalyticsHubServiceGrpc.getUpdateDataExchangeMethod = - getUpdateDataExchangeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataExchange")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.DataExchange - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("UpdateDataExchange")) - .build(); - } - } - } - return getUpdateDataExchangeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest, - com.google.protobuf.Empty> - getDeleteDataExchangeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDataExchange", - requestType = com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest, - com.google.protobuf.Empty> - getDeleteDataExchangeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest, - com.google.protobuf.Empty> - getDeleteDataExchangeMethod; - if ((getDeleteDataExchangeMethod = AnalyticsHubServiceGrpc.getDeleteDataExchangeMethod) - == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getDeleteDataExchangeMethod = AnalyticsHubServiceGrpc.getDeleteDataExchangeMethod) - == null) { - AnalyticsHubServiceGrpc.getDeleteDataExchangeMethod = - getDeleteDataExchangeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataExchange")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("DeleteDataExchange")) - .build(); - } - } - } - return getDeleteDataExchangeMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse> - getListListingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListListings", - requestType = com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse> - getListListingsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse> - getListListingsMethod; - if ((getListListingsMethod = AnalyticsHubServiceGrpc.getListListingsMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getListListingsMethod = AnalyticsHubServiceGrpc.getListListingsMethod) == null) { - AnalyticsHubServiceGrpc.getListListingsMethod = - getListListingsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListListings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("ListListings")) - .build(); - } - } - } - return getListListingsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getGetListingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetListing", - requestType = com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.Listing.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getGetListingMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getGetListingMethod; - if ((getGetListingMethod = AnalyticsHubServiceGrpc.getGetListingMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getGetListingMethod = AnalyticsHubServiceGrpc.getGetListingMethod) == null) { - AnalyticsHubServiceGrpc.getGetListingMethod = - getGetListingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetListing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.Listing - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("GetListing")) - .build(); - } - } - } - return getGetListingMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getCreateListingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateListing", - requestType = com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.Listing.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getCreateListingMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getCreateListingMethod; - if ((getCreateListingMethod = AnalyticsHubServiceGrpc.getCreateListingMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getCreateListingMethod = AnalyticsHubServiceGrpc.getCreateListingMethod) == null) { - AnalyticsHubServiceGrpc.getCreateListingMethod = - getCreateListingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateListing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.Listing - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("CreateListing")) - .build(); - } - } - } - return getCreateListingMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getUpdateListingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateListing", - requestType = com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.Listing.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getUpdateListingMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing> - getUpdateListingMethod; - if ((getUpdateListingMethod = AnalyticsHubServiceGrpc.getUpdateListingMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getUpdateListingMethod = AnalyticsHubServiceGrpc.getUpdateListingMethod) == null) { - AnalyticsHubServiceGrpc.getUpdateListingMethod = - getUpdateListingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateListing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.Listing - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("UpdateListing")) - .build(); - } - } - } - return getUpdateListingMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest, com.google.protobuf.Empty> - getDeleteListingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteListing", - requestType = com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest, com.google.protobuf.Empty> - getDeleteListingMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest, - com.google.protobuf.Empty> - getDeleteListingMethod; - if ((getDeleteListingMethod = AnalyticsHubServiceGrpc.getDeleteListingMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getDeleteListingMethod = AnalyticsHubServiceGrpc.getDeleteListingMethod) == null) { - AnalyticsHubServiceGrpc.getDeleteListingMethod = - getDeleteListingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteListing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("DeleteListing")) - .build(); - } - } - } - return getDeleteListingMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - getSubscribeListingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SubscribeListing", - requestType = com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.class, - responseType = com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - getSubscribeListingMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - getSubscribeListingMethod; - if ((getSubscribeListingMethod = AnalyticsHubServiceGrpc.getSubscribeListingMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getSubscribeListingMethod = AnalyticsHubServiceGrpc.getSubscribeListingMethod) - == null) { - AnalyticsHubServiceGrpc.getSubscribeListingMethod = - getSubscribeListingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SubscribeListing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsHubServiceMethodDescriptorSupplier("SubscribeListing")) - .build(); - } - } - } - return getSubscribeListingMethod; - } - - 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 = AnalyticsHubServiceGrpc.getGetIamPolicyMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getGetIamPolicyMethod = AnalyticsHubServiceGrpc.getGetIamPolicyMethod) == null) { - AnalyticsHubServiceGrpc.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 AnalyticsHubServiceMethodDescriptorSupplier("GetIamPolicy")) - .build(); - } - } - } - return getGetIamPolicyMethod; - } - - 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 = AnalyticsHubServiceGrpc.getSetIamPolicyMethod) == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getSetIamPolicyMethod = AnalyticsHubServiceGrpc.getSetIamPolicyMethod) == null) { - AnalyticsHubServiceGrpc.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 AnalyticsHubServiceMethodDescriptorSupplier("SetIamPolicy")) - .build(); - } - } - } - return getSetIamPolicyMethod; - } - - 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 = AnalyticsHubServiceGrpc.getTestIamPermissionsMethod) - == null) { - synchronized (AnalyticsHubServiceGrpc.class) { - if ((getTestIamPermissionsMethod = AnalyticsHubServiceGrpc.getTestIamPermissionsMethod) - == null) { - AnalyticsHubServiceGrpc.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 AnalyticsHubServiceMethodDescriptorSupplier("TestIamPermissions")) - .build(); - } - } - } - return getTestIamPermissionsMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static AnalyticsHubServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AnalyticsHubServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceStub(channel, callOptions); - } - }; - return AnalyticsHubServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AnalyticsHubServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AnalyticsHubServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceBlockingStub(channel, callOptions); - } - }; - return AnalyticsHubServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static AnalyticsHubServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AnalyticsHubServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceFutureStub(channel, callOptions); - } - }; - return AnalyticsHubServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The `AnalyticsHubService` API facilitates data sharing within and across
-   * organizations. It allows data providers to publish listings that reference
-   * shared datasets. With Analytics Hub, users can discover and search for
-   * listings that they have access to. Subscribers can view and subscribe to
-   * listings. When you subscribe to a listing, Analytics Hub creates a linked
-   * dataset in your project.
-   * 
- */ - public abstract static class AnalyticsHubServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists all data exchanges in a given project and location.
-     * 
- */ - public void listDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListDataExchangesMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all data exchanges from projects in a given organization and
-     * location.
-     * 
- */ - public void listOrgDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListOrgDataExchangesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a data exchange.
-     * 
- */ - public void getDataExchange( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetDataExchangeMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new data exchange.
-     * 
- */ - public void createDataExchange( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateDataExchangeMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing data exchange.
-     * 
- */ - public void updateDataExchange( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateDataExchangeMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes an existing data exchange.
-     * 
- */ - public void deleteDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteDataExchangeMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all listings in a given project and location.
-     * 
- */ - public void listListings( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListListingsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a listing.
-     * 
- */ - public void getListing( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetListingMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new listing.
-     * 
- */ - public void createListing( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateListingMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing listing.
-     * 
- */ - public void updateListing( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateListingMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a listing.
-     * 
- */ - public void deleteListing( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteListingMethod(), responseObserver); - } - - /** - * - * - *
-     * Subscribes to a listing.
-     * Currently, with Analytics Hub, you can create listings that
-     * reference only BigQuery datasets.
-     * Upon subscription to a listing for a BigQuery dataset, Analytics Hub
-     * creates a linked dataset in the subscriber's project.
-     * 
- */ - public void subscribeListing( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSubscribeListingMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the IAM policy.
-     * 
- */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Sets the IAM policy.
-     * 
- */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSetIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Returns the permissions that a caller has.
-     * 
- */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getTestIamPermissionsMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListDataExchangesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse>( - this, METHODID_LIST_DATA_EXCHANGES))) - .addMethod( - getListOrgDataExchangesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse>( - this, METHODID_LIST_ORG_DATA_EXCHANGES))) - .addMethod( - getGetDataExchangeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange>( - this, METHODID_GET_DATA_EXCHANGE))) - .addMethod( - getCreateDataExchangeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange>( - this, METHODID_CREATE_DATA_EXCHANGE))) - .addMethod( - getUpdateDataExchangeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest, - com.google.cloud.bigquery.analyticshub.v1.DataExchange>( - this, METHODID_UPDATE_DATA_EXCHANGE))) - .addMethod( - getDeleteDataExchangeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_DATA_EXCHANGE))) - .addMethod( - getListListingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse>( - this, METHODID_LIST_LISTINGS))) - .addMethod( - getGetListingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing>( - this, METHODID_GET_LISTING))) - .addMethod( - getCreateListingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing>( - this, METHODID_CREATE_LISTING))) - .addMethod( - getUpdateListingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest, - com.google.cloud.bigquery.analyticshub.v1.Listing>( - this, METHODID_UPDATE_LISTING))) - .addMethod( - getDeleteListingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_LISTING))) - .addMethod( - getSubscribeListingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse>( - this, METHODID_SUBSCRIBE_LISTING))) - .addMethod( - getGetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( - this, METHODID_GET_IAM_POLICY))) - .addMethod( - getSetIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( - this, METHODID_SET_IAM_POLICY))) - .addMethod( - getTestIamPermissionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v1.TestIamPermissionsRequest, - com.google.iam.v1.TestIamPermissionsResponse>( - this, METHODID_TEST_IAM_PERMISSIONS))) - .build(); - } - } - - /** - * - * - *
-   * The `AnalyticsHubService` API facilitates data sharing within and across
-   * organizations. It allows data providers to publish listings that reference
-   * shared datasets. With Analytics Hub, users can discover and search for
-   * listings that they have access to. Subscribers can view and subscribe to
-   * listings. When you subscribe to a listing, Analytics Hub creates a linked
-   * dataset in your project.
-   * 
- */ - public static final class AnalyticsHubServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AnalyticsHubServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AnalyticsHubServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists all data exchanges in a given project and location.
-     * 
- */ - public void listDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDataExchangesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists all data exchanges from projects in a given organization and
-     * location.
-     * 
- */ - public void listOrgDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListOrgDataExchangesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a data exchange.
-     * 
- */ - public void getDataExchange( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDataExchangeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new data exchange.
-     * 
- */ - public void createDataExchange( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateDataExchangeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing data exchange.
-     * 
- */ - public void updateDataExchange( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateDataExchangeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes an existing data exchange.
-     * 
- */ - public void deleteDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteDataExchangeMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists all listings in a given project and location.
-     * 
- */ - public void listListings( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListListingsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a listing.
-     * 
- */ - public void getListing( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetListingMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a new listing.
-     * 
- */ - public void createListing( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateListingMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing listing.
-     * 
- */ - public void updateListing( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateListingMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a listing.
-     * 
- */ - public void deleteListing( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteListingMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Subscribes to a listing.
-     * Currently, with Analytics Hub, you can create listings that
-     * reference only BigQuery datasets.
-     * Upon subscription to a listing for a BigQuery dataset, Analytics Hub
-     * creates a linked dataset in the subscriber's project.
-     * 
- */ - public void subscribeListing( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSubscribeListingMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the IAM policy.
-     * 
- */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Sets the IAM policy.
-     * 
- */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Returns the permissions that a caller has.
-     * 
- */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The `AnalyticsHubService` API facilitates data sharing within and across
-   * organizations. It allows data providers to publish listings that reference
-   * shared datasets. With Analytics Hub, users can discover and search for
-   * listings that they have access to. Subscribers can view and subscribe to
-   * listings. When you subscribe to a listing, Analytics Hub creates a linked
-   * dataset in your project.
-   * 
- */ - public static final class AnalyticsHubServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AnalyticsHubServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AnalyticsHubServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists all data exchanges in a given project and location.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse listDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDataExchangesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists all data exchanges from projects in a given organization and
-     * location.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - listOrgDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListOrgDataExchangesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a data exchange.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDataExchangeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new data exchange.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange createDataExchange( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateDataExchangeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing data exchange.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange updateDataExchange( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateDataExchangeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an existing data exchange.
-     * 
- */ - public com.google.protobuf.Empty deleteDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteDataExchangeMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists all listings in a given project and location.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse listListings( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListListingsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a listing.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.Listing getListing( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetListingMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new listing.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.Listing createListing( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateListingMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing listing.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.Listing updateListing( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateListingMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a listing.
-     * 
- */ - public com.google.protobuf.Empty deleteListing( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteListingMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Subscribes to a listing.
-     * Currently, with Analytics Hub, you can create listings that
-     * reference only BigQuery datasets.
-     * Upon subscription to a listing for a BigQuery dataset, Analytics Hub
-     * creates a linked dataset in the subscriber's project.
-     * 
- */ - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse subscribeListing( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSubscribeListingMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the IAM policy.
-     * 
- */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Sets the IAM policy.
-     * 
- */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Returns the permissions that a caller has.
-     * 
- */ - public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The `AnalyticsHubService` API facilitates data sharing within and across
-   * organizations. It allows data providers to publish listings that reference
-   * shared datasets. With Analytics Hub, users can discover and search for
-   * listings that they have access to. Subscribers can view and subscribe to
-   * listings. When you subscribe to a listing, Analytics Hub creates a linked
-   * dataset in your project.
-   * 
- */ - public static final class AnalyticsHubServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AnalyticsHubServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AnalyticsHubServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsHubServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists all data exchanges in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse> - listDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDataExchangesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists all data exchanges from projects in a given organization and
-     * location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse> - listOrgDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListOrgDataExchangesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a data exchange.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - getDataExchange(com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDataExchangeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new data exchange.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - createDataExchange( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateDataExchangeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an existing data exchange.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.DataExchange> - updateDataExchange( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateDataExchangeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes an existing data exchange.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteDataExchangeMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists all listings in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse> - listListings(com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListListingsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a listing.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.Listing> - getListing(com.google.cloud.bigquery.analyticshub.v1.GetListingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetListingMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new listing.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.Listing> - createListing(com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateListingMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an existing listing.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.Listing> - updateListing(com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateListingMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a listing.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteListing(com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteListingMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Subscribes to a listing.
-     * Currently, with Analytics Hub, you can create listings that
-     * reference only BigQuery datasets.
-     * Upon subscription to a listing for a BigQuery dataset, Analytics Hub
-     * creates a linked dataset in the subscriber's project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse> - subscribeListing( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSubscribeListingMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the IAM policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Sets the IAM policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Returns the permissions that a caller has.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v1.TestIamPermissionsResponse> - testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_DATA_EXCHANGES = 0; - private static final int METHODID_LIST_ORG_DATA_EXCHANGES = 1; - private static final int METHODID_GET_DATA_EXCHANGE = 2; - private static final int METHODID_CREATE_DATA_EXCHANGE = 3; - private static final int METHODID_UPDATE_DATA_EXCHANGE = 4; - private static final int METHODID_DELETE_DATA_EXCHANGE = 5; - private static final int METHODID_LIST_LISTINGS = 6; - private static final int METHODID_GET_LISTING = 7; - private static final int METHODID_CREATE_LISTING = 8; - private static final int METHODID_UPDATE_LISTING = 9; - private static final int METHODID_DELETE_LISTING = 10; - private static final int METHODID_SUBSCRIBE_LISTING = 11; - private static final int METHODID_GET_IAM_POLICY = 12; - private static final int METHODID_SET_IAM_POLICY = 13; - private static final int METHODID_TEST_IAM_PERMISSIONS = 14; - - 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 AnalyticsHubServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AnalyticsHubServiceImplBase 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_LIST_DATA_EXCHANGES: - serviceImpl.listDataExchanges( - (com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse>) - responseObserver); - break; - case METHODID_LIST_ORG_DATA_EXCHANGES: - serviceImpl.listOrgDataExchanges( - (com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse>) - responseObserver); - break; - case METHODID_GET_DATA_EXCHANGE: - serviceImpl.getDataExchange( - (com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_DATA_EXCHANGE: - serviceImpl.createDataExchange( - (com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_DATA_EXCHANGE: - serviceImpl.updateDataExchange( - (com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_DATA_EXCHANGE: - serviceImpl.deleteDataExchange( - (com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_LISTINGS: - serviceImpl.listListings( - (com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse>) - responseObserver); - break; - case METHODID_GET_LISTING: - serviceImpl.getListing( - (com.google.cloud.bigquery.analyticshub.v1.GetListingRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_LISTING: - serviceImpl.createListing( - (com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_LISTING: - serviceImpl.updateListing( - (com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_LISTING: - serviceImpl.deleteListing( - (com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SUBSCRIBE_LISTING: - serviceImpl.subscribeListing( - (com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse>) - responseObserver); - break; - case METHODID_GET_IAM_POLICY: - serviceImpl.getIamPolicy( - (com.google.iam.v1.GetIamPolicyRequest) 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_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 AnalyticsHubServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AnalyticsHubServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AnalyticsHubService"); - } - } - - private static final class AnalyticsHubServiceFileDescriptorSupplier - extends AnalyticsHubServiceBaseDescriptorSupplier { - AnalyticsHubServiceFileDescriptorSupplier() {} - } - - private static final class AnalyticsHubServiceMethodDescriptorSupplier - extends AnalyticsHubServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - AnalyticsHubServiceMethodDescriptorSupplier(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 (AnalyticsHubServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AnalyticsHubServiceFileDescriptorSupplier()) - .addMethod(getListDataExchangesMethod()) - .addMethod(getListOrgDataExchangesMethod()) - .addMethod(getGetDataExchangeMethod()) - .addMethod(getCreateDataExchangeMethod()) - .addMethod(getUpdateDataExchangeMethod()) - .addMethod(getDeleteDataExchangeMethod()) - .addMethod(getListListingsMethod()) - .addMethod(getGetListingMethod()) - .addMethod(getCreateListingMethod()) - .addMethod(getUpdateListingMethod()) - .addMethod(getDeleteListingMethod()) - .addMethod(getSubscribeListingMethod()) - .addMethod(getGetIamPolicyMethod()) - .addMethod(getSetIamPolicyMethod()) - .addMethod(getTestIamPermissionsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubProto.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubProto.java deleted file mode 100644 index f11c659979c4..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/AnalyticsHubProto.java +++ /dev/null @@ -1,602 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public final class AnalyticsHubProto { - private AnalyticsHubProto() {} - - 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_bigquery_analyticshub_v1_DataExchange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n8google/cloud/bigquery/analyticshub/v1/" - + "analyticshub.proto\022%google.cloud.bigquer" - + "y.analyticshub.v1\032\034google/api/annotation" - + "s.proto\032\027google/api/client.proto\032\037google" - + "/api/field_behavior.proto\032\031google/api/re" - + "source.proto\032\036google/iam/v1/iam_policy.p" - + "roto\032\032google/iam/v1/policy.proto\032\033google" - + "/protobuf/empty.proto\032 google/protobuf/f" - + "ield_mask.proto\032\036google/protobuf/wrapper" - + "s.proto\"\265\002\n\014DataExchange\022\021\n\004name\030\001 \001(\tB\003" - + "\340A\003\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\030\n\013descri" - + "ption\030\003 \001(\tB\003\340A\001\022\034\n\017primary_contact\030\004 \001(" - + "\tB\003\340A\001\022\032\n\rdocumentation\030\005 \001(\tB\003\340A\001\022\032\n\rli" - + "sting_count\030\006 \001(\005B\003\340A\003\022\021\n\004icon\030\007 \001(\014B\003\340A" - + "\001:t\352Aq\n(analyticshub.googleapis.com/Data" - + "Exchange\022Eprojects/{project}/locations/{" - + "location}/dataExchanges/{data_exchange}\"" - + "?\n\014DataProvider\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\034\n\017pr" - + "imary_contact\030\002 \001(\tB\003\340A\001\"<\n\tPublisher\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\001\022\034\n\017primary_contact\030\002 \001(" - + "\tB\003\340A\001\"O\n\033DestinationDatasetReference\022\027\n" - + "\ndataset_id\030\001 \001(\tB\003\340A\002\022\027\n\nproject_id\030\002 \001" - + "(\tB\003\340A\002\"\214\003\n\022DestinationDataset\022b\n\021datase" - + "t_reference\030\001 \001(\0132B.google.cloud.bigquer" - + "y.analyticshub.v1.DestinationDatasetRefe" - + "renceB\003\340A\002\0228\n\rfriendly_name\030\002 \001(\0132\034.goog" - + "le.protobuf.StringValueB\003\340A\001\0226\n\013descript" - + "ion\030\003 \001(\0132\034.google.protobuf.StringValueB" - + "\003\340A\001\022Z\n\006labels\030\004 \003(\0132E.google.cloud.bigq" - + "uery.analyticshub.v1.DestinationDataset." - + "LabelsEntryB\003\340A\001\022\025\n\010location\030\005 \001(\tB\003\340A\002\032" - + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"\236\013\n\007Listing\022e\n\020bigquery_dataset\030\006" - + " \001(\0132D.google.cloud.bigquery.analyticshu" - + "b.v1.Listing.BigQueryDatasetSourceB\003\340A\002H" - + "\000\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001" - + "(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022\034\n\017pri" - + "mary_contact\030\004 \001(\tB\003\340A\001\022\032\n\rdocumentation" - + "\030\005 \001(\tB\003\340A\001\022H\n\005state\030\007 \001(\01624.google.clou" - + "d.bigquery.analyticshub.v1.Listing.State" - + "B\003\340A\003\022\021\n\004icon\030\010 \001(\014B\003\340A\001\022O\n\rdata_provide" - + "r\030\t \001(\01323.google.cloud.bigquery.analytic" - + "shub.v1.DataProviderB\003\340A\001\022P\n\ncategories\030" - + "\n \003(\01627.google.cloud.bigquery.analyticsh" - + "ub.v1.Listing.CategoryB\003\340A\001\022H\n\tpublisher" - + "\030\013 \001(\01320.google.cloud.bigquery.analytics" - + "hub.v1.PublisherB\003\340A\001\022\033\n\016request_access\030" - + "\014 \001(\tB\003\340A\001\032N\n\025BigQueryDatasetSource\0225\n\007d" - + "ataset\030\001 \001(\tB$\372A!\n\037bigquery.googleapis.c" - + "om/Dataset\"*\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\n\n\006ACTIVE\020\001\"\267\004\n\010Category\022\030\n\024CATEGORY_" - + "UNSPECIFIED\020\000\022\023\n\017CATEGORY_OTHERS\020\001\022&\n\"CA" - + "TEGORY_ADVERTISING_AND_MARKETING\020\002\022\025\n\021CA" - + "TEGORY_COMMERCE\020\003\022$\n CATEGORY_CLIMATE_AN" - + "D_ENVIRONMENT\020\004\022\031\n\025CATEGORY_DEMOGRAPHICS" - + "\020\005\022\026\n\022CATEGORY_ECONOMICS\020\006\022\026\n\022CATEGORY_E" - + "DUCATION\020\007\022\023\n\017CATEGORY_ENERGY\020\010\022\026\n\022CATEG" - + "ORY_FINANCIAL\020\t\022\023\n\017CATEGORY_GAMING\020\n\022\027\n\023" - + "CATEGORY_GEOSPATIAL\020\013\022(\n$CATEGORY_HEALTH" - + "CARE_AND_LIFE_SCIENCE\020\014\022\022\n\016CATEGORY_MEDI" - + "A\020\r\022\032\n\026CATEGORY_PUBLIC_SECTOR\020\016\022\023\n\017CATEG" - + "ORY_RETAIL\020\017\022\023\n\017CATEGORY_SPORTS\020\020\022!\n\035CAT" - + "EGORY_SCIENCE_AND_RESEARCH\020\021\022)\n%CATEGORY" - + "_TRANSPORTATION_AND_LOGISTICS\020\022\022\037\n\033CATEG" - + "ORY_TRAVEL_AND_TOURISM\020\023:\202\001\352A\177\n#analytic" - + "shub.googleapis.com/Listing\022Xprojects/{p" - + "roject}/locations/{location}/dataExchang" - + "es/{data_exchange}/listings/{listing}B\010\n" - + "\006source\"|\n\030ListDataExchangesRequest\0229\n\006p" - + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi" - + "s.com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" - + "e_token\030\003 \001(\t\"\201\001\n\031ListDataExchangesRespo" - + "nse\022K\n\016data_exchanges\030\001 \003(\01323.google.clo" - + "ud.bigquery.analyticshub.v1.DataExchange" - + "\022\027\n\017next_page_token\030\002 \001(\t\"_\n\033ListOrgData" - + "ExchangesRequest\022\031\n\014organization\030\001 \001(\tB\003" - + "\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\"\204\001\n\034ListOrgDataExchangesResponse\022K\n\016d" - + "ata_exchanges\030\001 \003(\01323.google.cloud.bigqu" - + "ery.analyticshub.v1.DataExchange\022\027\n\017next" - + "_page_token\030\002 \001(\t\"X\n\026GetDataExchangeRequ" - + "est\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(analyticshub." - + "googleapis.com/DataExchange\"\306\001\n\031CreateDa" - + "taExchangeRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A" - + "#\n!locations.googleapis.com/Location\022\035\n\020" - + "data_exchange_id\030\002 \001(\tB\003\340A\002\022O\n\rdata_exch" - + "ange\030\003 \001(\01323.google.cloud.bigquery.analy" - + "ticshub.v1.DataExchangeB\003\340A\002\"\242\001\n\031UpdateD" - + "ataExchangeRequest\0224\n\013update_mask\030\001 \001(\0132" - + "\032.google.protobuf.FieldMaskB\003\340A\002\022O\n\rdata" - + "_exchange\030\002 \001(\01323.google.cloud.bigquery." - + "analyticshub.v1.DataExchangeB\003\340A\002\"[\n\031Del" - + "eteDataExchangeRequest\022>\n\004name\030\001 \001(\tB0\340A" - + "\002\372A*\n(analyticshub.googleapis.com/DataEx" - + "change\"~\n\023ListListingsRequest\022@\n\006parent\030" - + "\001 \001(\tB0\340A\002\372A*\n(analyticshub.googleapis.c" - + "om/DataExchange\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" - + "ge_token\030\003 \001(\t\"q\n\024ListListingsResponse\022@" - + "\n\010listings\030\001 \003(\0132..google.cloud.bigquery" - + ".analyticshub.v1.Listing\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"N\n\021GetListingRequest\0229\n\004name\030\001" - + " \001(\tB+\340A\002\372A%\n#analyticshub.googleapis.co" - + "m/Listing\"\267\001\n\024CreateListingRequest\022@\n\006pa" - + "rent\030\001 \001(\tB0\340A\002\372A*\n(analyticshub.googlea" - + "pis.com/DataExchange\022\027\n\nlisting_id\030\002 \001(\t" - + "B\003\340A\002\022D\n\007listing\030\003 \001(\0132..google.cloud.bi" - + "gquery.analyticshub.v1.ListingB\003\340A\002\"\222\001\n\024" - + "UpdateListingRequest\0224\n\013update_mask\030\001 \001(" - + "\0132\032.google.protobuf.FieldMaskB\003\340A\002\022D\n\007li" - + "sting\030\002 \001(\0132..google.cloud.bigquery.anal" - + "yticshub.v1.ListingB\003\340A\002\"Q\n\024DeleteListin" - + "gRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#analytic" - + "shub.googleapis.com/Listing\"\275\001\n\027Subscrib" - + "eListingRequest\022X\n\023destination_dataset\030\003" - + " \001(\01329.google.cloud.bigquery.analyticshu" - + "b.v1.DestinationDatasetH\000\0229\n\004name\030\001 \001(\tB" - + "+\340A\002\372A%\n#analyticshub.googleapis.com/Lis" - + "tingB\r\n\013destination\"\032\n\030SubscribeListingR" - + "esponse2\336\033\n\023AnalyticsHubService\022\332\001\n\021List" - + "DataExchanges\022?.google.cloud.bigquery.an" - + "alyticshub.v1.ListDataExchangesRequest\032@" - + ".google.cloud.bigquery.analyticshub.v1.L" - + "istDataExchangesResponse\"B\202\323\344\223\0023\0221/v1/{p" - + "arent=projects/*/locations/*}/dataExchan" - + "ges\332A\006parent\022\364\001\n\024ListOrgDataExchanges\022B." - + "google.cloud.bigquery.analyticshub.v1.Li" - + "stOrgDataExchangesRequest\032C.google.cloud" - + ".bigquery.analyticshub.v1.ListOrgDataExc" - + "hangesResponse\"S\202\323\344\223\002>\022\022\022*.google.cloud.bigquery.ana" - + "lyticshub.v1.SubscribeListingRequest\032?.g" - + "oogle.cloud.bigquery.analyticshub.v1.Sub" - + "scribeListingResponse\"X\202\323\344\223\002K\"F/v1/{name" - + "=projects/*/locations/*/dataExchanges/*/" - + "listings/*}:subscribe:\001*\332A\004name\022\356\001\n\014GetI" - + "amPolicy\022\".google.iam.v1.GetIamPolicyReq" - + "uest\032\025.google.iam.v1.Policy\"\242\001\202\323\344\223\002\233\001\"B/" - + "v1/{resource=projects/*/locations/*/data" - + "Exchanges/*}:getIamPolicy:\001*ZR\"M/v1/{res" - + "ource=projects/*/locations/*/dataExchang" - + "es/*/listings/*}:getIamPolicy:\001*\022\356\001\n\014Set" - + "IamPolicy\022\".google.iam.v1.SetIamPolicyRe" - + "quest\032\025.google.iam.v1.Policy\"\242\001\202\323\344\223\002\233\001\"B" - + "/v1/{resource=projects/*/locations/*/dat" - + "aExchanges/*}:setIamPolicy:\001*ZR\"M/v1/{re" - + "source=projects/*/locations/*/dataExchan" - + "ges/*/listings/*}:setIamPolicy:\001*\022\232\002\n\022Te" - + "stIamPermissions\022(.google.iam.v1.TestIam" - + "PermissionsRequest\032).google.iam.v1.TestI" - + "amPermissionsResponse\"\256\001\202\323\344\223\002\247\001\"H/v1/{re" - + "source=projects/*/locations/*/dataExchan" - + "ges/*}:testIamPermissions:\001*ZX\"S/v1/{res" - + "ource=projects/*/locations/*/dataExchang" - + "es/*/listings/*}:testIamPermissions:\001*\032x" - + "\312A\033analyticshub.googleapis.com\322AWhttps:/" - + "/www.googleapis.com/auth/bigquery,https:" - + "//www.googleapis.com/auth/cloud-platform" - + "B\332\002\n)com.google.cloud.bigquery.analytics" - + "hub.v1B\021AnalyticsHubProtoP\001ZQgoogle.gola" - + "ng.org/genproto/googleapis/cloud/bigquer" - + "y/analyticshub/v1;analyticshub\252\002%Google." - + "Cloud.BigQuery.AnalyticsHub.V1\312\002%Google\\" - + "Cloud\\BigQuery\\AnalyticsHub\\V1\352\002)Google:" - + ":Cloud::Bigquery::AnalyticsHub::V1\352AH\n\037b" - + "igquery.googleapis.com/Dataset\022%projects" - + "/{project}/datasets/{dataset}b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.iam.v1.IamPolicyProto.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_descriptor, - new java.lang.String[] { - "Name", - "DisplayName", - "Description", - "PrimaryContact", - "Documentation", - "ListingCount", - "Icon", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor, - new java.lang.String[] { - "Name", "PrimaryContact", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor, - new java.lang.String[] { - "Name", "PrimaryContact", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor, - new java.lang.String[] { - "DatasetId", "ProjectId", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor, - new java.lang.String[] { - "DatasetReference", "FriendlyName", "Description", "Labels", "Location", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_descriptor = - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor, - new java.lang.String[] { - "BigqueryDataset", - "Name", - "DisplayName", - "Description", - "PrimaryContact", - "Documentation", - "State", - "Icon", - "DataProvider", - "Categories", - "Publisher", - "RequestAccess", - "Source", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor = - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor, - new java.lang.String[] { - "Dataset", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor, - new java.lang.String[] { - "DataExchanges", "NextPageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor, - new java.lang.String[] { - "Organization", "PageSize", "PageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor, - new java.lang.String[] { - "DataExchanges", "NextPageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor, - new java.lang.String[] { - "Parent", "DataExchangeId", "DataExchange", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor, - new java.lang.String[] { - "UpdateMask", "DataExchange", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor, - new java.lang.String[] { - "Listings", "NextPageToken", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor, - new java.lang.String[] { - "Parent", "ListingId", "Listing", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor, - new java.lang.String[] { - "UpdateMask", "Listing", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor, - new java.lang.String[] { - "DestinationDataset", "Name", "Destination", - }); - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor, - new java.lang.String[] {}); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.iam.v1.IamPolicyProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequest.java deleted file mode 100644 index 72f5b6b8caca..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequest.java +++ /dev/null @@ -1,1147 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for creating a data exchange.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest} - */ -public final class CreateDataExchangeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) - CreateDataExchangeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateDataExchangeRequest.newBuilder() to construct. - private CreateDataExchangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateDataExchangeRequest() { - parent_ = ""; - dataExchangeId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateDataExchangeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource path of the data exchange.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource path of the data exchange.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_EXCHANGE_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object dataExchangeId_; - /** - * - * - *
-   * Required. The ID of the data exchange.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dataExchangeId. - */ - @java.lang.Override - public java.lang.String getDataExchangeId() { - java.lang.Object ref = dataExchangeId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataExchangeId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the data exchange.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dataExchangeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataExchangeIdBytes() { - java.lang.Object ref = dataExchangeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataExchangeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_EXCHANGE_FIELD_NUMBER = 3; - private com.google.cloud.bigquery.analyticshub.v1.DataExchange dataExchange_; - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - @java.lang.Override - public boolean hasDataExchange() { - return dataExchange_ != null; - } - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange() { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangeOrBuilder() { - return getDataExchange(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataExchangeId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataExchangeId_); - } - if (dataExchange_ != null) { - output.writeMessage(3, getDataExchange()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataExchangeId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataExchangeId_); - } - if (dataExchange_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataExchange()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.CreateDataExchangeRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest other = - (com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getDataExchangeId().equals(other.getDataExchangeId())) return false; - if (hasDataExchange() != other.hasDataExchange()) return false; - if (hasDataExchange()) { - if (!getDataExchange().equals(other.getDataExchange())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DATA_EXCHANGE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDataExchangeId().hashCode(); - if (hasDataExchange()) { - hash = (37 * hash) + DATA_EXCHANGE_FIELD_NUMBER; - hash = (53 * hash) + getDataExchange().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest 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.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - 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.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.CreateDataExchangeRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.CreateDataExchangeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for creating a data exchange.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - dataExchangeId_ = ""; - - if (dataExchangeBuilder_ == null) { - dataExchange_ = null; - } else { - dataExchange_ = null; - dataExchangeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateDataExchangeRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest build() { - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest result = - new com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest(this); - result.parent_ = parent_; - result.dataExchangeId_ = dataExchangeId_; - if (dataExchangeBuilder_ == null) { - result.dataExchange_ = dataExchange_; - } else { - result.dataExchange_ = dataExchangeBuilder_.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.bigquery.analyticshub.v1.CreateDataExchangeRequest) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getDataExchangeId().isEmpty()) { - dataExchangeId_ = other.dataExchangeId_; - onChanged(); - } - if (other.hasDataExchange()) { - mergeDataExchange(other.getDataExchange()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - dataExchangeId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - input.readMessage(getDataExchangeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource path of the data exchange.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchange.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchange.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchange.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchange.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 dataExchangeId_ = ""; - /** - * - * - *
-     * Required. The ID of the data exchange.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dataExchangeId. - */ - public java.lang.String getDataExchangeId() { - java.lang.Object ref = dataExchangeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataExchangeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the data exchange.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dataExchangeId. - */ - public com.google.protobuf.ByteString getDataExchangeIdBytes() { - java.lang.Object ref = dataExchangeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataExchangeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the data exchange.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The dataExchangeId to set. - * @return This builder for chaining. - */ - public Builder setDataExchangeId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataExchangeId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the data exchange.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDataExchangeId() { - - dataExchangeId_ = getDefaultInstance().getDataExchangeId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the data exchange.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for dataExchangeId to set. - * @return This builder for chaining. - */ - public Builder setDataExchangeIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataExchangeId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.bigquery.analyticshub.v1.DataExchange dataExchange_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - dataExchangeBuilder_; - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - public boolean hasDataExchange() { - return dataExchangeBuilder_ != null || dataExchange_ != null; - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange() { - if (dataExchangeBuilder_ == null) { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } else { - return dataExchangeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataExchange(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataExchange_ = value; - onChanged(); - } else { - dataExchangeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangeBuilder_ == null) { - dataExchange_ = builderForValue.build(); - onChanged(); - } else { - dataExchangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDataExchange(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangeBuilder_ == null) { - if (dataExchange_ != null) { - dataExchange_ = - com.google.cloud.bigquery.analyticshub.v1.DataExchange.newBuilder(dataExchange_) - .mergeFrom(value) - .buildPartial(); - } else { - dataExchange_ = value; - } - onChanged(); - } else { - dataExchangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDataExchange() { - if (dataExchangeBuilder_ == null) { - dataExchange_ = null; - onChanged(); - } else { - dataExchange_ = null; - dataExchangeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder getDataExchangeBuilder() { - - onChanged(); - return getDataExchangeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangeOrBuilder() { - if (dataExchangeBuilder_ != null) { - return dataExchangeBuilder_.getMessageOrBuilder(); - } else { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } - } - /** - * - * - *
-     * Required. The data exchange to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - getDataExchangeFieldBuilder() { - if (dataExchangeBuilder_ == null) { - dataExchangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder>( - getDataExchange(), getParentForChildren(), isClean()); - dataExchange_ = null; - } - return dataExchangeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.CreateDataExchangeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateDataExchangeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.CreateDataExchangeRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequestOrBuilder.java deleted file mode 100644 index b2970b5106a1..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateDataExchangeRequestOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface CreateDataExchangeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource path of the data exchange.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource path of the data exchange.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * 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 data exchange.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dataExchangeId. - */ - java.lang.String getDataExchangeId(); - /** - * - * - *
-   * Required. The ID of the data exchange.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string data_exchange_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dataExchangeId. - */ - com.google.protobuf.ByteString getDataExchangeIdBytes(); - - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - boolean hasDataExchange(); - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange(); - /** - * - * - *
-   * Required. The data exchange to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangeOrBuilder(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequest.java deleted file mode 100644 index 84680aa6b56e..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequest.java +++ /dev/null @@ -1,1140 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for creating a listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.CreateListingRequest} - */ -public final class CreateListingRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.CreateListingRequest) - CreateListingRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateListingRequest.newBuilder() to construct. - private CreateListingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateListingRequest() { - parent_ = ""; - listingId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateListingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LISTING_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object listingId_; - /** - * - * - *
-   * Required. The ID of the listing to create.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The listingId. - */ - @java.lang.Override - public java.lang.String getListingId() { - java.lang.Object ref = listingId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - listingId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the listing to create.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for listingId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getListingIdBytes() { - java.lang.Object ref = listingId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - listingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LISTING_FIELD_NUMBER = 3; - private com.google.cloud.bigquery.analyticshub.v1.Listing listing_; - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - @java.lang.Override - public boolean hasListing() { - return listing_ != null; - } - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing getListing() { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder() { - return getListing(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(listingId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, listingId_); - } - if (listing_ != null) { - output.writeMessage(3, getListing()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(listingId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, listingId_); - } - if (listing_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getListing()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.CreateListingRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest other = - (com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getListingId().equals(other.getListingId())) return false; - if (hasListing() != other.hasListing()) return false; - if (hasListing()) { - if (!getListing().equals(other.getListing())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LISTING_ID_FIELD_NUMBER; - hash = (53 * hash) + getListingId().hashCode(); - if (hasListing()) { - hash = (37 * hash) + LISTING_FIELD_NUMBER; - hash = (53 * hash) + getListing().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest 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.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - 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.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.CreateListingRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.CreateListingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for creating a listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.CreateListingRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.CreateListingRequest) - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - listingId_ = ""; - - if (listingBuilder_ == null) { - listing_ = null; - } else { - listing_ = null; - listingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_CreateListingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest build() { - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest result = - new com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest(this); - result.parent_ = parent_; - result.listingId_ = listingId_; - if (listingBuilder_ == null) { - result.listing_ = listing_; - } else { - result.listing_ = listingBuilder_.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.bigquery.analyticshub.v1.CreateListingRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getListingId().isEmpty()) { - listingId_ = other.listingId_; - onChanged(); - } - if (other.hasListing()) { - mergeListing(other.getListing()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - listingId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - input.readMessage(getListingFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 listingId_ = ""; - /** - * - * - *
-     * Required. The ID of the listing to create.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The listingId. - */ - public java.lang.String getListingId() { - java.lang.Object ref = listingId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - listingId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the listing to create.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for listingId. - */ - public com.google.protobuf.ByteString getListingIdBytes() { - java.lang.Object ref = listingId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - listingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the listing to create.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The listingId to set. - * @return This builder for chaining. - */ - public Builder setListingId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - listingId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the listing to create.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearListingId() { - - listingId_ = getDefaultInstance().getListingId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the listing to create.
-     * Must contain only Unicode letters, numbers (0-9), underscores (_).
-     * Should not use characters that require URL-escaping, or characters
-     * outside of ASCII, spaces.
-     * Max length: 100 bytes.
-     * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for listingId to set. - * @return This builder for chaining. - */ - public Builder setListingIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - listingId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.bigquery.analyticshub.v1.Listing listing_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - listingBuilder_; - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - public boolean hasListing() { - return listingBuilder_ != null || listing_ != null; - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing getListing() { - if (listingBuilder_ == null) { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } else { - return listingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setListing(com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - listing_ = value; - onChanged(); - } else { - listingBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setListing( - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder builderForValue) { - if (listingBuilder_ == null) { - listing_ = builderForValue.build(); - onChanged(); - } else { - listingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeListing(com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingBuilder_ == null) { - if (listing_ != null) { - listing_ = - com.google.cloud.bigquery.analyticshub.v1.Listing.newBuilder(listing_) - .mergeFrom(value) - .buildPartial(); - } else { - listing_ = value; - } - onChanged(); - } else { - listingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearListing() { - if (listingBuilder_ == null) { - listing_ = null; - onChanged(); - } else { - listing_ = null; - listingBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Builder getListingBuilder() { - - onChanged(); - return getListingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder() { - if (listingBuilder_ != null) { - return listingBuilder_.getMessageOrBuilder(); - } else { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } - } - /** - * - * - *
-     * Required. The listing to create.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - getListingFieldBuilder() { - if (listingBuilder_ == null) { - listingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder>( - getListing(), getParentForChildren(), isClean()); - listing_ = null; - } - return listingBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.CreateListingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.CreateListingRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateListingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.CreateListingRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequestOrBuilder.java deleted file mode 100644 index 865400648535..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/CreateListingRequestOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface CreateListingRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.CreateListingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * 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 listing to create.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The listingId. - */ - java.lang.String getListingId(); - /** - * - * - *
-   * Required. The ID of the listing to create.
-   * Must contain only Unicode letters, numbers (0-9), underscores (_).
-   * Should not use characters that require URL-escaping, or characters
-   * outside of ASCII, spaces.
-   * Max length: 100 bytes.
-   * 
- * - * string listing_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for listingId. - */ - com.google.protobuf.ByteString getListingIdBytes(); - - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - boolean hasListing(); - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - com.google.cloud.bigquery.analyticshub.v1.Listing getListing(); - /** - * - * - *
-   * Required. The listing to create.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchange.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchange.java deleted file mode 100644 index 88b51cadd85e..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchange.java +++ /dev/null @@ -1,1604 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * A data exchange is a container that lets you share data. Along with the
- * descriptive information about the data exchange, it contains listings that
- * reference shared datasets.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DataExchange} - */ -public final class DataExchange extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DataExchange) - DataExchangeOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataExchange.newBuilder() to construct. - private DataExchange(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataExchange() { - name_ = ""; - displayName_ = ""; - description_ = ""; - primaryContact_ = ""; - documentation_ = ""; - icon_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataExchange(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.class, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. Human-readable display name of the data exchange. The display name must
-   * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-   * spaces ( ), ampersands (&) and must not start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Human-readable display name of the data exchange. The display name must
-   * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-   * spaces ( ), ampersands (&) and must not start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Optional. Description of the data exchange. The description must not contain Unicode
-   * non-characters as well as C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Description of the data exchange. The description must not contain Unicode
-   * non-characters as well as C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRIMARY_CONTACT_FIELD_NUMBER = 4; - private volatile java.lang.Object primaryContact_; - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the data exchange.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - @java.lang.Override - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the data exchange.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DOCUMENTATION_FIELD_NUMBER = 5; - private volatile java.lang.Object documentation_; - /** - * - * - *
-   * Optional. Documentation describing the data exchange.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - @java.lang.Override - public java.lang.String getDocumentation() { - java.lang.Object ref = documentation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentation_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Documentation describing the data exchange.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentationBytes() { - java.lang.Object ref = documentation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LISTING_COUNT_FIELD_NUMBER = 6; - private int listingCount_; - /** - * - * - *
-   * Output only. Number of listings contained in the data exchange.
-   * 
- * - * int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The listingCount. - */ - @java.lang.Override - public int getListingCount() { - return listingCount_; - } - - public static final int ICON_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString icon_; - /** - * - * - *
-   * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
-   * Expected image dimensions are 512x512 pixels, however the API only
-   * performs validation on size of the encoded data.
-   * Note: For byte fields, the content of the fields are base64-encoded (which
-   * increases the size of the data by 33-36%) when using JSON on the wire.
-   * 
- * - * bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIcon() { - return icon_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, primaryContact_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, documentation_); - } - if (listingCount_ != 0) { - output.writeInt32(6, listingCount_); - } - if (!icon_.isEmpty()) { - output.writeBytes(7, icon_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, primaryContact_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, documentation_); - } - if (listingCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, listingCount_); - } - if (!icon_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(7, icon_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DataExchange)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DataExchange other = - (com.google.cloud.bigquery.analyticshub.v1.DataExchange) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getPrimaryContact().equals(other.getPrimaryContact())) return false; - if (!getDocumentation().equals(other.getDocumentation())) return false; - if (getListingCount() != other.getListingCount()) return false; - if (!getIcon().equals(other.getIcon())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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(); - hash = (37 * hash) + PRIMARY_CONTACT_FIELD_NUMBER; - hash = (53 * hash) + getPrimaryContact().hashCode(); - hash = (37 * hash) + DOCUMENTATION_FIELD_NUMBER; - hash = (53 * hash) + getDocumentation().hashCode(); - hash = (37 * hash) + LISTING_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getListingCount(); - hash = (37 * hash) + ICON_FIELD_NUMBER; - hash = (53 * hash) + getIcon().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange 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.bigquery.analyticshub.v1.DataExchange parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - 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.bigquery.analyticshub.v1.DataExchange parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - java.io.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.bigquery.analyticshub.v1.DataExchange parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DataExchange parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DataExchange prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data exchange is a container that lets you share data. Along with the
-   * descriptive information about the data exchange, it contains listings that
-   * reference shared datasets.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DataExchange} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DataExchange) - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.class, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.DataExchange.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - primaryContact_ = ""; - - documentation_ = ""; - - listingCount_ = 0; - - icon_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataExchange_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange build() { - com.google.cloud.bigquery.analyticshub.v1.DataExchange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DataExchange result = - new com.google.cloud.bigquery.analyticshub.v1.DataExchange(this); - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.primaryContact_ = primaryContact_; - result.documentation_ = documentation_; - result.listingCount_ = listingCount_; - result.icon_ = icon_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.DataExchange) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.DataExchange) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.DataExchange other) { - if (other == com.google.cloud.bigquery.analyticshub.v1.DataExchange.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.getPrimaryContact().isEmpty()) { - primaryContact_ = other.primaryContact_; - onChanged(); - } - if (!other.getDocumentation().isEmpty()) { - documentation_ = other.documentation_; - onChanged(); - } - if (other.getListingCount() != 0) { - setListingCount(other.getListingCount()); - } - if (other.getIcon() != com.google.protobuf.ByteString.EMPTY) { - setIcon(other.getIcon()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - primaryContact_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - documentation_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 48: - { - listingCount_ = input.readInt32(); - - break; - } // case 48 - case 58: - { - icon_ = input.readBytes(); - - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Required. Human-readable display name of the data exchange. The display name must
-     * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-     * spaces ( ), ampersands (&) and must not start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the data exchange. The display name must
-     * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-     * spaces ( ), ampersands (&) and must not start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the data exchange. The display name must
-     * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-     * spaces ( ), ampersands (&) and must not start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the data exchange. The display name must
-     * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-     * spaces ( ), ampersands (&) and must not start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Human-readable display name of the data exchange. The display name must
-     * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-     * spaces ( ), ampersands (&) and must not start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * Optional. Description of the data exchange. The description must not contain Unicode
-     * non-characters as well as C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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 data exchange. The description must not contain Unicode
-     * non-characters as well as C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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 data exchange. The description must not contain Unicode
-     * non-characters as well as C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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 data exchange. The description must not contain Unicode
-     * non-characters as well as C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Description of the data exchange. The description must not contain Unicode
-     * non-characters as well as C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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 primaryContact_ = ""; - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the data exchange.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the data exchange.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the data exchange.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContact(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - primaryContact_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the data exchange.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPrimaryContact() { - - primaryContact_ = getDefaultInstance().getPrimaryContact(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the data exchange.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContactBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - primaryContact_ = value; - onChanged(); - return this; - } - - private java.lang.Object documentation_ = ""; - /** - * - * - *
-     * Optional. Documentation describing the data exchange.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - public java.lang.String getDocumentation() { - java.lang.Object ref = documentation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Documentation describing the data exchange.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - public com.google.protobuf.ByteString getDocumentationBytes() { - java.lang.Object ref = documentation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Documentation describing the data exchange.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The documentation to set. - * @return This builder for chaining. - */ - public Builder setDocumentation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - documentation_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Documentation describing the data exchange.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDocumentation() { - - documentation_ = getDefaultInstance().getDocumentation(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Documentation describing the data exchange.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for documentation to set. - * @return This builder for chaining. - */ - public Builder setDocumentationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - documentation_ = value; - onChanged(); - return this; - } - - private int listingCount_; - /** - * - * - *
-     * Output only. Number of listings contained in the data exchange.
-     * 
- * - * int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The listingCount. - */ - @java.lang.Override - public int getListingCount() { - return listingCount_; - } - /** - * - * - *
-     * Output only. Number of listings contained in the data exchange.
-     * 
- * - * int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The listingCount to set. - * @return This builder for chaining. - */ - public Builder setListingCount(int value) { - - listingCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Number of listings contained in the data exchange.
-     * 
- * - * int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearListingCount() { - - listingCount_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString icon_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the content of the fields are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIcon() { - return icon_; - } - /** - * - * - *
-     * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the content of the fields are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The icon to set. - * @return This builder for chaining. - */ - public Builder setIcon(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - icon_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the content of the fields are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearIcon() { - - icon_ = getDefaultInstance().getIcon(); - 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.bigquery.analyticshub.v1.DataExchange) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DataExchange) - private static final com.google.cloud.bigquery.analyticshub.v1.DataExchange DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DataExchange(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataExchange getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataExchange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DataExchange getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeName.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeName.java deleted file mode 100644 index dc02da5133a9..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeName.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.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; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class DataExchangeName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_DATA_EXCHANGE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/dataExchanges/{data_exchange}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String dataExchange; - - @Deprecated - protected DataExchangeName() { - project = null; - location = null; - dataExchange = null; - } - - private DataExchangeName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataExchange = Preconditions.checkNotNull(builder.getDataExchange()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataExchange() { - return dataExchange; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static DataExchangeName of(String project, String location, String dataExchange) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataExchange(dataExchange) - .build(); - } - - public static String format(String project, String location, String dataExchange) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataExchange(dataExchange) - .build() - .toString(); - } - - public static DataExchangeName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_DATA_EXCHANGE.validatedMatch( - formattedString, "DataExchangeName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("data_exchange")); - } - - 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 (DataExchangeName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_DATA_EXCHANGE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (dataExchange != null) { - fieldMapBuilder.put("data_exchange", dataExchange); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_DATA_EXCHANGE.instantiate( - "project", project, "location", location, "data_exchange", dataExchange); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - DataExchangeName that = ((DataExchangeName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.dataExchange, that.dataExchange); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(dataExchange); - return h; - } - - /** Builder for projects/{project}/locations/{location}/dataExchanges/{data_exchange}. */ - public static class Builder { - private String project; - private String location; - private String dataExchange; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataExchange() { - return dataExchange; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setDataExchange(String dataExchange) { - this.dataExchange = dataExchange; - return this; - } - - private Builder(DataExchangeName dataExchangeName) { - this.project = dataExchangeName.project; - this.location = dataExchangeName.location; - this.dataExchange = dataExchangeName.dataExchange; - } - - public DataExchangeName build() { - return new DataExchangeName(this); - } - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeOrBuilder.java deleted file mode 100644 index 380916516fb7..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataExchangeOrBuilder.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DataExchangeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DataExchange) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Human-readable display name of the data exchange. The display name must
-   * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-   * spaces ( ), ampersands (&) and must not start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. Human-readable display name of the data exchange. The display name must
-   * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
-   * spaces ( ), ampersands (&) and must not start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Optional. Description of the data exchange. The description must not contain Unicode
-   * non-characters as well as C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. Description of the data exchange. The description must not contain Unicode
-   * non-characters as well as C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the data exchange.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - java.lang.String getPrimaryContact(); - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the data exchange.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - com.google.protobuf.ByteString getPrimaryContactBytes(); - - /** - * - * - *
-   * Optional. Documentation describing the data exchange.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - java.lang.String getDocumentation(); - /** - * - * - *
-   * Optional. Documentation describing the data exchange.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - com.google.protobuf.ByteString getDocumentationBytes(); - - /** - * - * - *
-   * Output only. Number of listings contained in the data exchange.
-   * 
- * - * int32 listing_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The listingCount. - */ - int getListingCount(); - - /** - * - * - *
-   * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
-   * Expected image dimensions are 512x512 pixels, however the API only
-   * performs validation on size of the encoded data.
-   * Note: For byte fields, the content of the fields are base64-encoded (which
-   * increases the size of the data by 33-36%) when using JSON on the wire.
-   * 
- * - * bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - com.google.protobuf.ByteString getIcon(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProvider.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProvider.java deleted file mode 100644 index 7af9f7b84d93..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProvider.java +++ /dev/null @@ -1,801 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Contains details of the data provider.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DataProvider} - */ -public final class DataProvider extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DataProvider) - DataProviderOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataProvider.newBuilder() to construct. - private DataProvider(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataProvider() { - name_ = ""; - primaryContact_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataProvider(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DataProvider.class, - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Optional. Name of the data provider.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Name of the data provider.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRIMARY_CONTACT_FIELD_NUMBER = 2; - private volatile java.lang.Object primaryContact_; - /** - * - * - *
-   * Optional. Email or URL of the data provider.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - @java.lang.Override - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Email or URL of the data provider.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, primaryContact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, primaryContact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DataProvider)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DataProvider other = - (com.google.cloud.bigquery.analyticshub.v1.DataProvider) obj; - - if (!getName().equals(other.getName())) return false; - if (!getPrimaryContact().equals(other.getPrimaryContact())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PRIMARY_CONTACT_FIELD_NUMBER; - hash = (53 * hash) + getPrimaryContact().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider 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.bigquery.analyticshub.v1.DataProvider parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - 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.bigquery.analyticshub.v1.DataProvider parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - java.io.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.bigquery.analyticshub.v1.DataProvider parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DataProvider parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DataProvider prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 details of the data provider.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DataProvider} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DataProvider) - com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DataProvider.class, - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.DataProvider.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - primaryContact_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DataProvider_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataProvider getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DataProvider.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataProvider build() { - com.google.cloud.bigquery.analyticshub.v1.DataProvider result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataProvider buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DataProvider result = - new com.google.cloud.bigquery.analyticshub.v1.DataProvider(this); - result.name_ = name_; - result.primaryContact_ = primaryContact_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.DataProvider) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.DataProvider) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.DataProvider other) { - if (other == com.google.cloud.bigquery.analyticshub.v1.DataProvider.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getPrimaryContact().isEmpty()) { - primaryContact_ = other.primaryContact_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - primaryContact_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Optional. Name of the data provider.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Name of the data provider.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Name of the data provider.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. Name of the data provider.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Name of the data provider.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 primaryContact_ = ""; - /** - * - * - *
-     * Optional. Email or URL of the data provider.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the data provider.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the data provider.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContact(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - primaryContact_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the data provider.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPrimaryContact() { - - primaryContact_ = getDefaultInstance().getPrimaryContact(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the data provider.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContactBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - primaryContact_ = 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.bigquery.analyticshub.v1.DataProvider) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DataProvider) - private static final com.google.cloud.bigquery.analyticshub.v1.DataProvider DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DataProvider(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DataProvider getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProvider parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DataProvider getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProviderOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProviderOrBuilder.java deleted file mode 100644 index 5e5fb5c1f4af..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DataProviderOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DataProviderOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DataProvider) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Name of the data provider.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Optional. Name of the data provider.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. Email or URL of the data provider.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - java.lang.String getPrimaryContact(); - /** - * - * - *
-   * Optional. Email or URL of the data provider.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - com.google.protobuf.ByteString getPrimaryContactBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequest.java deleted file mode 100644 index 4e3b3942488b..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequest.java +++ /dev/null @@ -1,647 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for deleting a data exchange.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest} - */ -public final class DeleteDataExchangeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) - DeleteDataExchangeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteDataExchangeRequest.newBuilder() to construct. - private DeleteDataExchangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteDataExchangeRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteDataExchangeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The full name of the data exchange resource that you want to delete.
-   * For example, `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The full name of the data exchange resource that you want to delete.
-   * For example, `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest other = - (com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.DeleteDataExchangeRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for deleting a data exchange.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteDataExchangeRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest build() { - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest result = - new com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest(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.bigquery.analyticshub.v1.DeleteDataExchangeRequest) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The full name of the data exchange resource that you want to delete.
-     * For example, `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 full name of the data exchange resource that you want to delete.
-     * For example, `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 full name of the data exchange resource that you want to delete.
-     * For example, `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 full name of the data exchange resource that you want to delete.
-     * For example, `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 full name of the data exchange resource that you want to delete.
-     * For example, `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteDataExchangeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DeleteDataExchangeRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequestOrBuilder.java deleted file mode 100644 index 28a5083b97a1..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteDataExchangeRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DeleteDataExchangeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The full name of the data exchange resource that you want to delete.
-   * For example, `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The full name of the data exchange resource that you want to delete.
-   * For example, `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * 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/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequest.java deleted file mode 100644 index d0117f5cbebc..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequest.java +++ /dev/null @@ -1,642 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for deleting a listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DeleteListingRequest} - */ -public final class DeleteListingRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) - DeleteListingRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteListingRequest.newBuilder() to construct. - private DeleteListingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteListingRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteListingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the listing to delete.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Resource name of the listing to delete.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DeleteListingRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest other = - (com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest 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.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - 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.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.DeleteListingRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DeleteListingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for deleting a listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DeleteListingRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DeleteListingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest build() { - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest result = - new com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest(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.bigquery.analyticshub.v1.DeleteListingRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the listing to delete.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Resource name of the listing to delete.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Resource name of the listing to delete.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of the listing to delete.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of the listing to delete.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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.bigquery.analyticshub.v1.DeleteListingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteListingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DeleteListingRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequestOrBuilder.java deleted file mode 100644 index 354053741df6..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DeleteListingRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DeleteListingRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DeleteListingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the listing to delete.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the listing to delete.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * 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/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDataset.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDataset.java deleted file mode 100644 index 6eb92478b66d..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDataset.java +++ /dev/null @@ -1,1870 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Defines the destination bigquery dataset.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DestinationDataset} - */ -public final class DestinationDataset extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DestinationDataset) - DestinationDatasetOrBuilder { - private static final long serialVersionUID = 0L; - // Use DestinationDataset.newBuilder() to construct. - private DestinationDataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DestinationDataset() { - location_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DestinationDataset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.class, - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder.class); - } - - public static final int DATASET_REFERENCE_FIELD_NUMBER = 1; - private com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference datasetReference_; - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the datasetReference field is set. - */ - @java.lang.Override - public boolean hasDatasetReference() { - return datasetReference_ != null; - } - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The datasetReference. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - getDatasetReference() { - return datasetReference_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.getDefaultInstance() - : datasetReference_; - } - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder - getDatasetReferenceOrBuilder() { - return getDatasetReference(); - } - - public static final int FRIENDLY_NAME_FIELD_NUMBER = 2; - private com.google.protobuf.StringValue friendlyName_; - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the friendlyName field is set. - */ - @java.lang.Override - public boolean hasFriendlyName() { - return friendlyName_ != null; - } - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The friendlyName. - */ - @java.lang.Override - public com.google.protobuf.StringValue getFriendlyName() { - return friendlyName_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : friendlyName_; - } - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.StringValueOrBuilder getFriendlyNameOrBuilder() { - return getFriendlyName(); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private com.google.protobuf.StringValue description_; - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the description field is set. - */ - @java.lang.Override - public boolean hasDescription() { - return description_ != null; - } - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The description. - */ - @java.lang.Override - public com.google.protobuf.StringValue getDescription() { - return description_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : description_; - } - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder() { - return getDescription(); - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOCATION_FIELD_NUMBER = 5; - private volatile java.lang.Object location_; - /** - * - * - *
-   * Required. The geographic location where the dataset should reside. See
-   * https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The geographic location where the dataset should reside. See
-   * https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - location_ = 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 (datasetReference_ != null) { - output.writeMessage(1, getDatasetReference()); - } - if (friendlyName_ != null) { - output.writeMessage(2, getFriendlyName()); - } - if (description_ != null) { - output.writeMessage(3, getDescription()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, location_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (datasetReference_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDatasetReference()); - } - if (friendlyName_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFriendlyName()); - } - if (description_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDescription()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, location_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DestinationDataset)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset other = - (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) obj; - - if (hasDatasetReference() != other.hasDatasetReference()) return false; - if (hasDatasetReference()) { - if (!getDatasetReference().equals(other.getDatasetReference())) return false; - } - if (hasFriendlyName() != other.hasFriendlyName()) return false; - if (hasFriendlyName()) { - if (!getFriendlyName().equals(other.getFriendlyName())) return false; - } - if (hasDescription() != other.hasDescription()) return false; - if (hasDescription()) { - if (!getDescription().equals(other.getDescription())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getLocation().equals(other.getLocation())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDatasetReference()) { - hash = (37 * hash) + DATASET_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getDatasetReference().hashCode(); - } - if (hasFriendlyName()) { - hash = (37 * hash) + FRIENDLY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFriendlyName().hashCode(); - } - if (hasDescription()) { - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset 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.bigquery.analyticshub.v1.DestinationDataset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - 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.bigquery.analyticshub.v1.DestinationDataset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - java.io.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.bigquery.analyticshub.v1.DestinationDataset parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DestinationDataset parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DestinationDataset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Defines the destination bigquery dataset.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DestinationDataset} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DestinationDataset) - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.class, - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (datasetReferenceBuilder_ == null) { - datasetReference_ = null; - } else { - datasetReference_ = null; - datasetReferenceBuilder_ = null; - } - if (friendlyNameBuilder_ == null) { - friendlyName_ = null; - } else { - friendlyName_ = null; - friendlyNameBuilder_ = null; - } - if (descriptionBuilder_ == null) { - description_ = null; - } else { - description_ = null; - descriptionBuilder_ = null; - } - internalGetMutableLabels().clear(); - location_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDataset_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset build() { - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset result = - new com.google.cloud.bigquery.analyticshub.v1.DestinationDataset(this); - int from_bitField0_ = bitField0_; - if (datasetReferenceBuilder_ == null) { - result.datasetReference_ = datasetReference_; - } else { - result.datasetReference_ = datasetReferenceBuilder_.build(); - } - if (friendlyNameBuilder_ == null) { - result.friendlyName_ = friendlyName_; - } else { - result.friendlyName_ = friendlyNameBuilder_.build(); - } - if (descriptionBuilder_ == null) { - result.description_ = description_; - } else { - result.description_ = descriptionBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.location_ = location_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.DestinationDataset) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.DestinationDataset other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance()) - return this; - if (other.hasDatasetReference()) { - mergeDatasetReference(other.getDatasetReference()); - } - if (other.hasFriendlyName()) { - mergeFriendlyName(other.getFriendlyName()); - } - if (other.hasDescription()) { - mergeDescription(other.getDescription()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - getDatasetReferenceFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getFriendlyNameFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - input.readMessage(getDescriptionFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - break; - } // case 34 - case 42: - { - location_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference datasetReference_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder> - datasetReferenceBuilder_; - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the datasetReference field is set. - */ - public boolean hasDatasetReference() { - return datasetReferenceBuilder_ != null || datasetReference_ != null; - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The datasetReference. - */ - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - getDatasetReference() { - if (datasetReferenceBuilder_ == null) { - return datasetReference_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - .getDefaultInstance() - : datasetReference_; - } else { - return datasetReferenceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDatasetReference( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference value) { - if (datasetReferenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetReference_ = value; - onChanged(); - } else { - datasetReferenceBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDatasetReference( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder - builderForValue) { - if (datasetReferenceBuilder_ == null) { - datasetReference_ = builderForValue.build(); - onChanged(); - } else { - datasetReferenceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDatasetReference( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference value) { - if (datasetReferenceBuilder_ == null) { - if (datasetReference_ != null) { - datasetReference_ = - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.newBuilder( - datasetReference_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetReference_ = value; - } - onChanged(); - } else { - datasetReferenceBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDatasetReference() { - if (datasetReferenceBuilder_ == null) { - datasetReference_ = null; - onChanged(); - } else { - datasetReference_ = null; - datasetReferenceBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder - getDatasetReferenceBuilder() { - - onChanged(); - return getDatasetReferenceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder - getDatasetReferenceOrBuilder() { - if (datasetReferenceBuilder_ != null) { - return datasetReferenceBuilder_.getMessageOrBuilder(); - } else { - return datasetReference_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - .getDefaultInstance() - : datasetReference_; - } - } - /** - * - * - *
-     * Required. A reference that identifies the destination dataset.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder> - getDatasetReferenceFieldBuilder() { - if (datasetReferenceBuilder_ == null) { - datasetReferenceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder>( - getDatasetReference(), getParentForChildren(), isClean()); - datasetReference_ = null; - } - return datasetReferenceBuilder_; - } - - private com.google.protobuf.StringValue friendlyName_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - friendlyNameBuilder_; - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the friendlyName field is set. - */ - public boolean hasFriendlyName() { - return friendlyNameBuilder_ != null || friendlyName_ != null; - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The friendlyName. - */ - public com.google.protobuf.StringValue getFriendlyName() { - if (friendlyNameBuilder_ == null) { - return friendlyName_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : friendlyName_; - } else { - return friendlyNameBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFriendlyName(com.google.protobuf.StringValue value) { - if (friendlyNameBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - friendlyName_ = value; - onChanged(); - } else { - friendlyNameBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFriendlyName(com.google.protobuf.StringValue.Builder builderForValue) { - if (friendlyNameBuilder_ == null) { - friendlyName_ = builderForValue.build(); - onChanged(); - } else { - friendlyNameBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFriendlyName(com.google.protobuf.StringValue value) { - if (friendlyNameBuilder_ == null) { - if (friendlyName_ != null) { - friendlyName_ = - com.google.protobuf.StringValue.newBuilder(friendlyName_) - .mergeFrom(value) - .buildPartial(); - } else { - friendlyName_ = value; - } - onChanged(); - } else { - friendlyNameBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFriendlyName() { - if (friendlyNameBuilder_ == null) { - friendlyName_ = null; - onChanged(); - } else { - friendlyName_ = null; - friendlyNameBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.StringValue.Builder getFriendlyNameBuilder() { - - onChanged(); - return getFriendlyNameFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.StringValueOrBuilder getFriendlyNameOrBuilder() { - if (friendlyNameBuilder_ != null) { - return friendlyNameBuilder_.getMessageOrBuilder(); - } else { - return friendlyName_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : friendlyName_; - } - } - /** - * - * - *
-     * Optional. A descriptive name for the dataset.
-     * 
- * - * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - getFriendlyNameFieldBuilder() { - if (friendlyNameBuilder_ == null) { - friendlyNameBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder>( - getFriendlyName(), getParentForChildren(), isClean()); - friendlyName_ = null; - } - return friendlyNameBuilder_; - } - - private com.google.protobuf.StringValue description_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - descriptionBuilder_; - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the description field is set. - */ - public boolean hasDescription() { - return descriptionBuilder_ != null || description_ != null; - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The description. - */ - public com.google.protobuf.StringValue getDescription() { - if (descriptionBuilder_ == null) { - return description_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : description_; - } else { - return descriptionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDescription(com.google.protobuf.StringValue value) { - if (descriptionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - onChanged(); - } else { - descriptionBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDescription(com.google.protobuf.StringValue.Builder builderForValue) { - if (descriptionBuilder_ == null) { - description_ = builderForValue.build(); - onChanged(); - } else { - descriptionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeDescription(com.google.protobuf.StringValue value) { - if (descriptionBuilder_ == null) { - if (description_ != null) { - description_ = - com.google.protobuf.StringValue.newBuilder(description_) - .mergeFrom(value) - .buildPartial(); - } else { - description_ = value; - } - onChanged(); - } else { - descriptionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearDescription() { - if (descriptionBuilder_ == null) { - description_ = null; - onChanged(); - } else { - description_ = null; - descriptionBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.StringValue.Builder getDescriptionBuilder() { - - onChanged(); - return getDescriptionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder() { - if (descriptionBuilder_ != null) { - return descriptionBuilder_.getMessageOrBuilder(); - } else { - return description_ == null - ? com.google.protobuf.StringValue.getDefaultInstance() - : description_; - } - } - /** - * - * - *
-     * Optional. A user-friendly description of the dataset.
-     * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder> - getDescriptionFieldBuilder() { - if (descriptionBuilder_ == null) { - descriptionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.StringValue, - com.google.protobuf.StringValue.Builder, - com.google.protobuf.StringValueOrBuilder>( - getDescription(), getParentForChildren(), isClean()); - description_ = null; - } - return descriptionBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. The labels associated with this dataset. You can use these
-     * to organize and group your datasets.
-     * You can set this property when inserting or updating a dataset.
-     * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-     * for more information.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object location_ = ""; - /** - * - * - *
-     * Required. The geographic location where the dataset should reside. See
-     * https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The geographic location where the dataset should reside. See
-     * https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for location. - */ - public com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The geographic location where the dataset should reside. See
-     * https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The geographic location where the dataset should reside. See
-     * https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The geographic location where the dataset should reside. See
-     * https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = 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.bigquery.analyticshub.v1.DestinationDataset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DestinationDataset) - private static final com.google.cloud.bigquery.analyticshub.v1.DestinationDataset - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DestinationDataset(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDataset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DestinationDataset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DestinationDataset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetOrBuilder.java deleted file mode 100644 index 8af84df674a8..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetOrBuilder.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DestinationDatasetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DestinationDataset) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the datasetReference field is set. - */ - boolean hasDatasetReference(); - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The datasetReference. - */ - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference getDatasetReference(); - /** - * - * - *
-   * Required. A reference that identifies the destination dataset.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference dataset_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder - getDatasetReferenceOrBuilder(); - - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the friendlyName field is set. - */ - boolean hasFriendlyName(); - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The friendlyName. - */ - com.google.protobuf.StringValue getFriendlyName(); - /** - * - * - *
-   * Optional. A descriptive name for the dataset.
-   * 
- * - * .google.protobuf.StringValue friendly_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.StringValueOrBuilder getFriendlyNameOrBuilder(); - - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the description field is set. - */ - boolean hasDescription(); - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The description. - */ - com.google.protobuf.StringValue getDescription(); - /** - * - * - *
-   * Optional. A user-friendly description of the dataset.
-   * 
- * - * .google.protobuf.StringValue description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder(); - - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels associated with this dataset. You can use these
-   * to organize and group your datasets.
-   * You can set this property when inserting or updating a dataset.
-   * See https://cloud.google.com/resource-manager/docs/creating-managing-labels
-   * for more information.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Required. The geographic location where the dataset should reside. See
-   * https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The location. - */ - java.lang.String getLocation(); - /** - * - * - *
-   * Required. The geographic location where the dataset should reside. See
-   * https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string location = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for location. - */ - com.google.protobuf.ByteString getLocationBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReference.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReference.java deleted file mode 100644 index 86c985a0fef2..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReference.java +++ /dev/null @@ -1,818 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Contains the reference that identifies a destination bigquery dataset.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference} - */ -public final class DestinationDatasetReference extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) - DestinationDatasetReferenceOrBuilder { - private static final long serialVersionUID = 0L; - // Use DestinationDatasetReference.newBuilder() to construct. - private DestinationDatasetReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DestinationDatasetReference() { - datasetId_ = ""; - projectId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DestinationDatasetReference(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.class, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder.class); - } - - public static final int DATASET_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object datasetId_; - /** - * - * - *
-   * Required. A unique ID for this dataset, without the project name. The ID
-   * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-   * The maximum length is 1,024 characters.
-   * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datasetId. - */ - @java.lang.Override - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. A unique ID for this dataset, without the project name. The ID
-   * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-   * The maximum length is 1,024 characters.
-   * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datasetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the project containing this dataset.
-   * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the project containing this dataset.
-   * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.DestinationDatasetReference)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference other = - (com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) obj; - - if (!getDatasetId().equals(other.getDatasetId())) return false; - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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_ID_FIELD_NUMBER; - hash = (53 * hash) + getDatasetId().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference 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.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - 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.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - java.io.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.bigquery.analyticshub.v1.DestinationDatasetReference - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.DestinationDatasetReference prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 reference that identifies a destination bigquery dataset.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReferenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.class, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - datasetId_ = ""; - - projectId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_DestinationDatasetReference_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference build() { - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference result = - new com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference(this); - result.datasetId_ = datasetId_; - result.projectId_ = projectId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.DestinationDatasetReference) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - .getDefaultInstance()) return this; - if (!other.getDatasetId().isEmpty()) { - datasetId_ = other.datasetId_; - onChanged(); - } - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - datasetId_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - projectId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object datasetId_ = ""; - /** - * - * - *
-     * Required. A unique ID for this dataset, without the project name. The ID
-     * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-     * The maximum length is 1,024 characters.
-     * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datasetId. - */ - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. A unique ID for this dataset, without the project name. The ID
-     * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-     * The maximum length is 1,024 characters.
-     * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datasetId. - */ - public com.google.protobuf.ByteString getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. A unique ID for this dataset, without the project name. The ID
-     * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-     * The maximum length is 1,024 characters.
-     * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - datasetId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A unique ID for this dataset, without the project name. The ID
-     * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-     * The maximum length is 1,024 characters.
-     * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDatasetId() { - - datasetId_ = getDefaultInstance().getDatasetId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A unique ID for this dataset, without the project name. The ID
-     * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-     * The maximum length is 1,024 characters.
-     * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - datasetId_ = value; - onChanged(); - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the project containing this dataset.
-     * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the project containing this dataset.
-     * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the project containing this dataset.
-     * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the project containing this dataset.
-     * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the project containing this dataset.
-     * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.DestinationDatasetReference) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) - private static final com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DestinationDatasetReference parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.DestinationDatasetReference - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReferenceOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReferenceOrBuilder.java deleted file mode 100644 index cbd892cb24d3..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/DestinationDatasetReferenceOrBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface DestinationDatasetReferenceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.DestinationDatasetReference) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. A unique ID for this dataset, without the project name. The ID
-   * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-   * The maximum length is 1,024 characters.
-   * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The datasetId. - */ - java.lang.String getDatasetId(); - /** - * - * - *
-   * Required. A unique ID for this dataset, without the project name. The ID
-   * must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
-   * The maximum length is 1,024 characters.
-   * 
- * - * string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for datasetId. - */ - com.google.protobuf.ByteString getDatasetIdBytes(); - - /** - * - * - *
-   * Required. The ID of the project containing this dataset.
-   * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the project containing this dataset.
-   * 
- * - * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequest.java deleted file mode 100644 index c15b7e76fa9d..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequest.java +++ /dev/null @@ -1,643 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for getting a data exchange.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest} - */ -public final class GetDataExchangeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) - GetDataExchangeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetDataExchangeRequest.newBuilder() to construct. - private GetDataExchangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetDataExchangeRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetDataExchangeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.GetDataExchangeRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest other = - (com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest 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.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - 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.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.GetDataExchangeRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.GetDataExchangeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for getting a data exchange.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetDataExchangeRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest build() { - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest result = - new com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest(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.bigquery.analyticshub.v1.GetDataExchangeRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 resource name of the data exchange.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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.bigquery.analyticshub.v1.GetDataExchangeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDataExchangeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.GetDataExchangeRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequestOrBuilder.java deleted file mode 100644 index f0dbde6716dc..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetDataExchangeRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface GetDataExchangeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the data exchange.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * 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/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequest.java deleted file mode 100644 index f2b8a4265d75..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequest.java +++ /dev/null @@ -1,637 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for getting a listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.GetListingRequest} - */ -public final class GetListingRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.GetListingRequest) - GetListingRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetListingRequest.newBuilder() to construct. - private GetListingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetListingRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetListingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.GetListingRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest other = - (com.google.cloud.bigquery.analyticshub.v1.GetListingRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest 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.bigquery.analyticshub.v1.GetListingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - 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.bigquery.analyticshub.v1.GetListingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.GetListingRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.GetListingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.GetListingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for getting a listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.GetListingRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.GetListingRequest) - com.google.cloud.bigquery.analyticshub.v1.GetListingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_GetListingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetListingRequest getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetListingRequest build() { - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.GetListingRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.GetListingRequest result = - new com.google.cloud.bigquery.analyticshub.v1.GetListingRequest(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.bigquery.analyticshub.v1.GetListingRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.GetListingRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.GetListingRequest other) { - if (other == com.google.cloud.bigquery.analyticshub.v1.GetListingRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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 resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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 resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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 resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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 resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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.bigquery.analyticshub.v1.GetListingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.GetListingRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.GetListingRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.GetListingRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.GetListingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetListingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.GetListingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequestOrBuilder.java deleted file mode 100644 index 476f34423e4f..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/GetListingRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface GetListingRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.GetListingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * 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/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequest.java deleted file mode 100644 index b3dfc331e24f..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequest.java +++ /dev/null @@ -1,927 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for requesting the list of data exchanges.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest} - */ -public final class ListDataExchangesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) - ListDataExchangesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListDataExchangesRequest.newBuilder() to construct. - private ListDataExchangesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListDataExchangesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDataExchangesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource path of the data exchanges.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource path of the data exchanges.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * The maximum number of results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListDataExchangesRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest other = - (com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest 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.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - 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.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.ListDataExchangesRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListDataExchangesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for requesting the list of data exchanges.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest build() { - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest result = - new com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest(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.bigquery.analyticshub.v1.ListDataExchangesRequest) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - .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.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource path of the data exchanges.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchanges.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchanges.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchanges.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 parent resource path of the data exchanges.
-     * e.g. `projects/myproject/locations/US`.
-     * 
- * - * - * 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 results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * 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 results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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.bigquery.analyticshub.v1.ListDataExchangesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDataExchangesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListDataExchangesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequestOrBuilder.java deleted file mode 100644 index 19aee51d22aa..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesRequestOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListDataExchangesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource path of the data exchanges.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource path of the data exchanges.
-   * e.g. `projects/myproject/locations/US`.
-   * 
- * - * - * 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 results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponse.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponse.java deleted file mode 100644 index b1dba1d9c661..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponse.java +++ /dev/null @@ -1,1133 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for response to the list of data exchanges.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse} - */ -public final class ListDataExchangesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) - ListDataExchangesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListDataExchangesResponse.newBuilder() to construct. - private ListDataExchangesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListDataExchangesResponse() { - dataExchanges_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDataExchangesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.Builder.class); - } - - public static final int DATA_EXCHANGES_FIELD_NUMBER = 1; - private java.util.List dataExchanges_; - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public java.util.List - getDataExchangesList() { - return dataExchanges_; - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public java.util.List - getDataExchangesOrBuilderList() { - return dataExchanges_; - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public int getDataExchangesCount() { - return dataExchanges_.size(); - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index) { - return dataExchanges_.get(index); - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangesOrBuilder( - int index) { - return dataExchanges_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < dataExchanges_.size(); i++) { - output.writeMessage(1, dataExchanges_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < dataExchanges_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataExchanges_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListDataExchangesResponse)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse other = - (com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) obj; - - if (!getDataExchangesList().equals(other.getDataExchangesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDataExchangesCount() > 0) { - hash = (37 * hash) + DATA_EXCHANGES_FIELD_NUMBER; - hash = (53 * hash) + getDataExchangesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse 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.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - 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.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - java.io.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.bigquery.analyticshub.v1.ListDataExchangesResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListDataExchangesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for response to the list of data exchanges.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (dataExchangesBuilder_ == null) { - dataExchanges_ = java.util.Collections.emptyList(); - } else { - dataExchanges_ = null; - dataExchangesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListDataExchangesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse build() { - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse result = - new com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse(this); - int from_bitField0_ = bitField0_; - if (dataExchangesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - dataExchanges_ = java.util.Collections.unmodifiableList(dataExchanges_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.dataExchanges_ = dataExchanges_; - } else { - result.dataExchanges_ = dataExchangesBuilder_.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.bigquery.analyticshub.v1.ListDataExchangesResponse) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - .getDefaultInstance()) return this; - if (dataExchangesBuilder_ == null) { - if (!other.dataExchanges_.isEmpty()) { - if (dataExchanges_.isEmpty()) { - dataExchanges_ = other.dataExchanges_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDataExchangesIsMutable(); - dataExchanges_.addAll(other.dataExchanges_); - } - onChanged(); - } - } else { - if (!other.dataExchanges_.isEmpty()) { - if (dataExchangesBuilder_.isEmpty()) { - dataExchangesBuilder_.dispose(); - dataExchangesBuilder_ = null; - dataExchanges_ = other.dataExchanges_; - bitField0_ = (bitField0_ & ~0x00000001); - dataExchangesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDataExchangesFieldBuilder() - : null; - } else { - dataExchangesBuilder_.addAllMessages(other.dataExchanges_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.bigquery.analyticshub.v1.DataExchange m = - input.readMessage( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.parser(), - extensionRegistry); - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(m); - } else { - dataExchangesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List dataExchanges_ = - java.util.Collections.emptyList(); - - private void ensureDataExchangesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - dataExchanges_ = - new java.util.ArrayList( - dataExchanges_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - dataExchangesBuilder_; - - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesList() { - if (dataExchangesBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataExchanges_); - } else { - return dataExchangesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public int getDataExchangesCount() { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.size(); - } else { - return dataExchangesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index) { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.get(index); - } else { - return dataExchangesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder setDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.set(index, value); - onChanged(); - } else { - dataExchangesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder setDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.set(index, builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.add(value); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.add(index, value); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(index, builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addAllDataExchanges( - java.lang.Iterable - values) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataExchanges_); - onChanged(); - } else { - dataExchangesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder clearDataExchanges() { - if (dataExchangesBuilder_ == null) { - dataExchanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dataExchangesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder removeDataExchanges(int index) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.remove(index); - onChanged(); - } else { - dataExchangesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder getDataExchangesBuilder( - int index) { - return getDataExchangesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangesOrBuilder(int index) { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.get(index); - } else { - return dataExchangesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesOrBuilderList() { - if (dataExchangesBuilder_ != null) { - return dataExchangesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataExchanges_); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder - addDataExchangesBuilder() { - return getDataExchangesFieldBuilder() - .addBuilder(com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance()); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder addDataExchangesBuilder( - int index) { - return getDataExchangesFieldBuilder() - .addBuilder( - index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance()); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesBuilderList() { - return getDataExchangesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - getDataExchangesFieldBuilder() { - if (dataExchangesBuilder_ == null) { - dataExchangesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder>( - dataExchanges_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - dataExchanges_ = null; - } - return dataExchangesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - /** - * - * - *
-     * A token to request the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token to request the next page of 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.bigquery.analyticshub.v1.ListDataExchangesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) - private static final com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDataExchangesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListDataExchangesResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponseOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponseOrBuilder.java deleted file mode 100644 index da9eccfa5377..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListDataExchangesResponseOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListDataExchangesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - java.util.List getDataExchangesList(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - int getDataExchangesCount(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - java.util.List - getDataExchangesOrBuilderList(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangesOrBuilder( - int index); - - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequest.java deleted file mode 100644 index 0e13c05b83ae..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequest.java +++ /dev/null @@ -1,920 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for requesting the list of listings.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListListingsRequest} - */ -public final class ListListingsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListListingsRequest) - ListListingsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListListingsRequest.newBuilder() to construct. - private ListListingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListListingsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListListingsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * The maximum number of results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListListingsRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest other = - (com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest 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.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - 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.bigquery.analyticshub.v1.ListListingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.ListListingsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListListingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for requesting the list of listings.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListListingsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListListingsRequest) - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest build() { - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest result = - new com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest(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.bigquery.analyticshub.v1.ListListingsRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest.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.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 parent resource path of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-     * 
- * - * - * 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 results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * 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 results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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.bigquery.analyticshub.v1.ListListingsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListListingsRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListListingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListListingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequestOrBuilder.java deleted file mode 100644 index 967c2358816a..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsRequestOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListListingsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListListingsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource path of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123`.
-   * 
- * - * - * 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 results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponse.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponse.java deleted file mode 100644 index f783da12a9ef..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponse.java +++ /dev/null @@ -1,1116 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for response to the list of Listings.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListListingsResponse} - */ -public final class ListListingsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListListingsResponse) - ListListingsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListListingsResponse.newBuilder() to construct. - private ListListingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListListingsResponse() { - listings_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListListingsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.Builder.class); - } - - public static final int LISTINGS_FIELD_NUMBER = 1; - private java.util.List listings_; - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - @java.lang.Override - public java.util.List getListingsList() { - return listings_; - } - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - @java.lang.Override - public java.util.List - getListingsOrBuilderList() { - return listings_; - } - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - @java.lang.Override - public int getListingsCount() { - return listings_.size(); - } - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing getListings(int index) { - return listings_.get(index); - } - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingsOrBuilder( - int index) { - return listings_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < listings_.size(); i++) { - output.writeMessage(1, listings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < listings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, listings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListListingsResponse)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse other = - (com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse) obj; - - if (!getListingsList().equals(other.getListingsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getListingsCount() > 0) { - hash = (37 * hash) + LISTINGS_FIELD_NUMBER; - hash = (53 * hash) + getListingsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse 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.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - 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.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - java.io.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.bigquery.analyticshub.v1.ListListingsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListListingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for response to the list of Listings.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListListingsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListListingsResponse) - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (listingsBuilder_ == null) { - listings_ = java.util.Collections.emptyList(); - } else { - listings_ = null; - listingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListListingsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse build() { - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse result = - new com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse(this); - int from_bitField0_ = bitField0_; - if (listingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - listings_ = java.util.Collections.unmodifiableList(listings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.listings_ = listings_; - } else { - result.listings_ = listingsBuilder_.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.bigquery.analyticshub.v1.ListListingsResponse) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse.getDefaultInstance()) - return this; - if (listingsBuilder_ == null) { - if (!other.listings_.isEmpty()) { - if (listings_.isEmpty()) { - listings_ = other.listings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureListingsIsMutable(); - listings_.addAll(other.listings_); - } - onChanged(); - } - } else { - if (!other.listings_.isEmpty()) { - if (listingsBuilder_.isEmpty()) { - listingsBuilder_.dispose(); - listingsBuilder_ = null; - listings_ = other.listings_; - bitField0_ = (bitField0_ & ~0x00000001); - listingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListingsFieldBuilder() - : null; - } else { - listingsBuilder_.addAllMessages(other.listings_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.bigquery.analyticshub.v1.Listing m = - input.readMessage( - com.google.cloud.bigquery.analyticshub.v1.Listing.parser(), - extensionRegistry); - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - listings_.add(m); - } else { - listingsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List listings_ = - java.util.Collections.emptyList(); - - private void ensureListingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - listings_ = - new java.util.ArrayList(listings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - listingsBuilder_; - - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public java.util.List getListingsList() { - if (listingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(listings_); - } else { - return listingsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public int getListingsCount() { - if (listingsBuilder_ == null) { - return listings_.size(); - } else { - return listingsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing getListings(int index) { - if (listingsBuilder_ == null) { - return listings_.get(index); - } else { - return listingsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder setListings(int index, com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListingsIsMutable(); - listings_.set(index, value); - onChanged(); - } else { - listingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder setListings( - int index, com.google.cloud.bigquery.analyticshub.v1.Listing.Builder builderForValue) { - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - listings_.set(index, builderForValue.build()); - onChanged(); - } else { - listingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder addListings(com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListingsIsMutable(); - listings_.add(value); - onChanged(); - } else { - listingsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder addListings(int index, com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListingsIsMutable(); - listings_.add(index, value); - onChanged(); - } else { - listingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder addListings( - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder builderForValue) { - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - listings_.add(builderForValue.build()); - onChanged(); - } else { - listingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder addListings( - int index, com.google.cloud.bigquery.analyticshub.v1.Listing.Builder builderForValue) { - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - listings_.add(index, builderForValue.build()); - onChanged(); - } else { - listingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder addAllListings( - java.lang.Iterable values) { - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listings_); - onChanged(); - } else { - listingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder clearListings() { - if (listingsBuilder_ == null) { - listings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - listingsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public Builder removeListings(int index) { - if (listingsBuilder_ == null) { - ensureListingsIsMutable(); - listings_.remove(index); - onChanged(); - } else { - listingsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Builder getListingsBuilder(int index) { - return getListingsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingsOrBuilder( - int index) { - if (listingsBuilder_ == null) { - return listings_.get(index); - } else { - return listingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public java.util.List - getListingsOrBuilderList() { - if (listingsBuilder_ != null) { - return listingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(listings_); - } - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Builder addListingsBuilder() { - return getListingsFieldBuilder() - .addBuilder(com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance()); - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Builder addListingsBuilder(int index) { - return getListingsFieldBuilder() - .addBuilder( - index, com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance()); - } - /** - * - * - *
-     * The list of Listing.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - public java.util.List - getListingsBuilderList() { - return getListingsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - getListingsFieldBuilder() { - if (listingsBuilder_ == null) { - listingsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder>( - listings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - listings_ = null; - } - return listingsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - /** - * - * - *
-     * A token to request the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token to request the next page of 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.bigquery.analyticshub.v1.ListListingsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListListingsResponse) - private static final com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListListingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListListingsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponseOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponseOrBuilder.java deleted file mode 100644 index 7b7de4605c78..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListListingsResponseOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListListingsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListListingsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - java.util.List getListingsList(); - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.Listing getListings(int index); - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - int getListingsCount(); - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - java.util.List - getListingsOrBuilderList(); - /** - * - * - *
-   * The list of Listing.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing listings = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingsOrBuilder(int index); - - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequest.java deleted file mode 100644 index 22dc51ddee61..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequest.java +++ /dev/null @@ -1,915 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for requesting the list of data exchanges from projects in an
- * organization and location.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest} - */ -public final class ListOrgDataExchangesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) - ListOrgDataExchangesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListOrgDataExchangesRequest.newBuilder() to construct. - private ListOrgDataExchangesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListOrgDataExchangesRequest() { - organization_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListOrgDataExchangesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.Builder.class); - } - - public static final int ORGANIZATION_FIELD_NUMBER = 1; - private volatile java.lang.Object organization_; - /** - * - * - *
-   * Required. The organization resource path of the projects containing DataExchanges.
-   * e.g. `organizations/myorg/locations/US`.
-   * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The organization. - */ - @java.lang.Override - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The organization resource path of the projects containing DataExchanges.
-   * e.g. `organizations/myorg/locations/US`.
-   * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for organization. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - organization_ = 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 results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, organization_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, organization_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest other = - (com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) obj; - - if (!getOrganization().equals(other.getOrganization())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ORGANIZATION_FIELD_NUMBER; - hash = (53 * hash) + getOrganization().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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for requesting the list of data exchanges from projects in an
-   * organization and location.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.class, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - organization_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest build() { - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest result = - new com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest(this); - result.organization_ = organization_; - 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - .getDefaultInstance()) return this; - if (!other.getOrganization().isEmpty()) { - organization_ = other.organization_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - organization_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object organization_ = ""; - /** - * - * - *
-     * Required. The organization resource path of the projects containing DataExchanges.
-     * e.g. `organizations/myorg/locations/US`.
-     * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The organization. - */ - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The organization resource path of the projects containing DataExchanges.
-     * e.g. `organizations/myorg/locations/US`.
-     * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for organization. - */ - public com.google.protobuf.ByteString getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - organization_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The organization resource path of the projects containing DataExchanges.
-     * e.g. `organizations/myorg/locations/US`.
-     * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The organization to set. - * @return This builder for chaining. - */ - public Builder setOrganization(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - organization_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The organization resource path of the projects containing DataExchanges.
-     * e.g. `organizations/myorg/locations/US`.
-     * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOrganization() { - - organization_ = getDefaultInstance().getOrganization(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The organization resource path of the projects containing DataExchanges.
-     * e.g. `organizations/myorg/locations/US`.
-     * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for organization to set. - * @return This builder for chaining. - */ - public Builder setOrganizationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - organization_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * The maximum number of results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * 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 results to return in a single response page. Leverage
-     * the page tokens to iterate through the entire collection.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Page token, returned by a previous call, to request the next page of
-     * results.
-     * 
- * - * 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOrgDataExchangesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListOrgDataExchangesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequestOrBuilder.java deleted file mode 100644 index 9662ff7492dc..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesRequestOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListOrgDataExchangesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The organization resource path of the projects containing DataExchanges.
-   * e.g. `organizations/myorg/locations/US`.
-   * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The organization. - */ - java.lang.String getOrganization(); - /** - * - * - *
-   * Required. The organization resource path of the projects containing DataExchanges.
-   * e.g. `organizations/myorg/locations/US`.
-   * 
- * - * string organization = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for organization. - */ - com.google.protobuf.ByteString getOrganizationBytes(); - - /** - * - * - *
-   * The maximum number of results to return in a single response page. Leverage
-   * the page tokens to iterate through the entire collection.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Page token, returned by a previous call, to request the next page of
-   * results.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponse.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponse.java deleted file mode 100644 index 62fcfea1b594..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponse.java +++ /dev/null @@ -1,1136 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for response to listing data exchanges in an organization and
- * location.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse} - */ -public final class ListOrgDataExchangesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) - ListOrgDataExchangesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListOrgDataExchangesResponse.newBuilder() to construct. - private ListOrgDataExchangesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListOrgDataExchangesResponse() { - dataExchanges_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListOrgDataExchangesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.Builder.class); - } - - public static final int DATA_EXCHANGES_FIELD_NUMBER = 1; - private java.util.List dataExchanges_; - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public java.util.List - getDataExchangesList() { - return dataExchanges_; - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public java.util.List - getDataExchangesOrBuilderList() { - return dataExchanges_; - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public int getDataExchangesCount() { - return dataExchanges_.size(); - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index) { - return dataExchanges_.get(index); - } - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangesOrBuilder( - int index) { - return dataExchanges_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < dataExchanges_.size(); i++) { - output.writeMessage(1, dataExchanges_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < dataExchanges_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataExchanges_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse other = - (com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) obj; - - if (!getDataExchangesList().equals(other.getDataExchangesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDataExchangesCount() > 0) { - hash = (37 * hash) + DATA_EXCHANGES_FIELD_NUMBER; - hash = (53 * hash) + getDataExchangesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - java.io.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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for response to listing data exchanges in an organization and
-   * location.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.class, - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (dataExchangesBuilder_ == null) { - dataExchanges_ = java.util.Collections.emptyList(); - } else { - dataExchanges_ = null; - dataExchangesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_ListOrgDataExchangesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse build() { - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse result = - new com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse(this); - int from_bitField0_ = bitField0_; - if (dataExchangesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - dataExchanges_ = java.util.Collections.unmodifiableList(dataExchanges_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.dataExchanges_ = dataExchanges_; - } else { - result.dataExchanges_ = dataExchangesBuilder_.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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - .getDefaultInstance()) return this; - if (dataExchangesBuilder_ == null) { - if (!other.dataExchanges_.isEmpty()) { - if (dataExchanges_.isEmpty()) { - dataExchanges_ = other.dataExchanges_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDataExchangesIsMutable(); - dataExchanges_.addAll(other.dataExchanges_); - } - onChanged(); - } - } else { - if (!other.dataExchanges_.isEmpty()) { - if (dataExchangesBuilder_.isEmpty()) { - dataExchangesBuilder_.dispose(); - dataExchangesBuilder_ = null; - dataExchanges_ = other.dataExchanges_; - bitField0_ = (bitField0_ & ~0x00000001); - dataExchangesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDataExchangesFieldBuilder() - : null; - } else { - dataExchangesBuilder_.addAllMessages(other.dataExchanges_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.bigquery.analyticshub.v1.DataExchange m = - input.readMessage( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.parser(), - extensionRegistry); - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(m); - } else { - dataExchangesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List dataExchanges_ = - java.util.Collections.emptyList(); - - private void ensureDataExchangesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - dataExchanges_ = - new java.util.ArrayList( - dataExchanges_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - dataExchangesBuilder_; - - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesList() { - if (dataExchangesBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataExchanges_); - } else { - return dataExchangesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public int getDataExchangesCount() { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.size(); - } else { - return dataExchangesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index) { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.get(index); - } else { - return dataExchangesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder setDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.set(index, value); - onChanged(); - } else { - dataExchangesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder setDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.set(index, builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.add(value); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataExchangesIsMutable(); - dataExchanges_.add(index, value); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addDataExchanges( - int index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.add(index, builderForValue.build()); - onChanged(); - } else { - dataExchangesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder addAllDataExchanges( - java.lang.Iterable - values) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataExchanges_); - onChanged(); - } else { - dataExchangesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder clearDataExchanges() { - if (dataExchangesBuilder_ == null) { - dataExchanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dataExchangesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public Builder removeDataExchanges(int index) { - if (dataExchangesBuilder_ == null) { - ensureDataExchangesIsMutable(); - dataExchanges_.remove(index); - onChanged(); - } else { - dataExchangesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder getDataExchangesBuilder( - int index) { - return getDataExchangesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangesOrBuilder(int index) { - if (dataExchangesBuilder_ == null) { - return dataExchanges_.get(index); - } else { - return dataExchangesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesOrBuilderList() { - if (dataExchangesBuilder_ != null) { - return dataExchangesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataExchanges_); - } - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder - addDataExchangesBuilder() { - return getDataExchangesFieldBuilder() - .addBuilder(com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance()); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder addDataExchangesBuilder( - int index) { - return getDataExchangesFieldBuilder() - .addBuilder( - index, com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance()); - } - /** - * - * - *
-     * The list of data exchanges.
-     * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - public java.util.List - getDataExchangesBuilderList() { - return getDataExchangesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - getDataExchangesFieldBuilder() { - if (dataExchangesBuilder_ == null) { - dataExchangesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder>( - dataExchanges_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - dataExchanges_ = null; - } - return dataExchangesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - } - /** - * - * - *
-     * A token to request the next page of 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; - } - /** - * - * - *
-     * A token to request the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token to request the next page of 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) - private static final com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListOrgDataExchangesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.ListOrgDataExchangesResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponseOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponseOrBuilder.java deleted file mode 100644 index 8e6080b299ca..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListOrgDataExchangesResponseOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListOrgDataExchangesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - java.util.List getDataExchangesList(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchanges(int index); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - int getDataExchangesCount(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - java.util.List - getDataExchangesOrBuilderList(); - /** - * - * - *
-   * The list of data exchanges.
-   * 
- * - * repeated .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchanges = 1; - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangesOrBuilder( - int index); - - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token to request the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Listing.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Listing.java deleted file mode 100644 index 645cec845f45..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Listing.java +++ /dev/null @@ -1,4335 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * A listing is what gets published into a data exchange that a subscriber can
- * subscribe to. It contains a reference to the data source along with
- * descriptive information that will help subscribers find and subscribe the
- * data.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Listing} - */ -public final class Listing extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.Listing) - ListingOrBuilder { - private static final long serialVersionUID = 0L; - // Use Listing.newBuilder() to construct. - private Listing(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Listing() { - name_ = ""; - displayName_ = ""; - description_ = ""; - primaryContact_ = ""; - documentation_ = ""; - state_ = 0; - icon_ = com.google.protobuf.ByteString.EMPTY; - categories_ = java.util.Collections.emptyList(); - requestAccess_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Listing(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Listing.class, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder.class); - } - - /** - * - * - *
-   * State of the listing.
-   * 
- * - * Protobuf enum {@code google.cloud.bigquery.analyticshub.v1.Listing.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default value. This value is unused.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * Subscribable state. Users with dataexchange.listings.subscribe permission
-     * can subscribe to this listing.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Default value. This value is unused.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Subscribable state. Users with dataexchange.listings.subscribe permission
-     * can subscribe to this listing.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return ACTIVE; - 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 State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.Listing.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.analyticshub.v1.Listing.State) - } - - /** - * - * - *
-   * Listing categories.
-   * 
- * - * Protobuf enum {@code google.cloud.bigquery.analyticshub.v1.Listing.Category} - */ - public enum Category implements com.google.protobuf.ProtocolMessageEnum { - /** CATEGORY_UNSPECIFIED = 0; */ - CATEGORY_UNSPECIFIED(0), - /** CATEGORY_OTHERS = 1; */ - CATEGORY_OTHERS(1), - /** CATEGORY_ADVERTISING_AND_MARKETING = 2; */ - CATEGORY_ADVERTISING_AND_MARKETING(2), - /** CATEGORY_COMMERCE = 3; */ - CATEGORY_COMMERCE(3), - /** CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; */ - CATEGORY_CLIMATE_AND_ENVIRONMENT(4), - /** CATEGORY_DEMOGRAPHICS = 5; */ - CATEGORY_DEMOGRAPHICS(5), - /** CATEGORY_ECONOMICS = 6; */ - CATEGORY_ECONOMICS(6), - /** CATEGORY_EDUCATION = 7; */ - CATEGORY_EDUCATION(7), - /** CATEGORY_ENERGY = 8; */ - CATEGORY_ENERGY(8), - /** CATEGORY_FINANCIAL = 9; */ - CATEGORY_FINANCIAL(9), - /** CATEGORY_GAMING = 10; */ - CATEGORY_GAMING(10), - /** CATEGORY_GEOSPATIAL = 11; */ - CATEGORY_GEOSPATIAL(11), - /** CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; */ - CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE(12), - /** CATEGORY_MEDIA = 13; */ - CATEGORY_MEDIA(13), - /** CATEGORY_PUBLIC_SECTOR = 14; */ - CATEGORY_PUBLIC_SECTOR(14), - /** CATEGORY_RETAIL = 15; */ - CATEGORY_RETAIL(15), - /** CATEGORY_SPORTS = 16; */ - CATEGORY_SPORTS(16), - /** CATEGORY_SCIENCE_AND_RESEARCH = 17; */ - CATEGORY_SCIENCE_AND_RESEARCH(17), - /** CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; */ - CATEGORY_TRANSPORTATION_AND_LOGISTICS(18), - /** CATEGORY_TRAVEL_AND_TOURISM = 19; */ - CATEGORY_TRAVEL_AND_TOURISM(19), - UNRECOGNIZED(-1), - ; - - /** CATEGORY_UNSPECIFIED = 0; */ - public static final int CATEGORY_UNSPECIFIED_VALUE = 0; - /** CATEGORY_OTHERS = 1; */ - public static final int CATEGORY_OTHERS_VALUE = 1; - /** CATEGORY_ADVERTISING_AND_MARKETING = 2; */ - public static final int CATEGORY_ADVERTISING_AND_MARKETING_VALUE = 2; - /** CATEGORY_COMMERCE = 3; */ - public static final int CATEGORY_COMMERCE_VALUE = 3; - /** CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; */ - public static final int CATEGORY_CLIMATE_AND_ENVIRONMENT_VALUE = 4; - /** CATEGORY_DEMOGRAPHICS = 5; */ - public static final int CATEGORY_DEMOGRAPHICS_VALUE = 5; - /** CATEGORY_ECONOMICS = 6; */ - public static final int CATEGORY_ECONOMICS_VALUE = 6; - /** CATEGORY_EDUCATION = 7; */ - public static final int CATEGORY_EDUCATION_VALUE = 7; - /** CATEGORY_ENERGY = 8; */ - public static final int CATEGORY_ENERGY_VALUE = 8; - /** CATEGORY_FINANCIAL = 9; */ - public static final int CATEGORY_FINANCIAL_VALUE = 9; - /** CATEGORY_GAMING = 10; */ - public static final int CATEGORY_GAMING_VALUE = 10; - /** CATEGORY_GEOSPATIAL = 11; */ - public static final int CATEGORY_GEOSPATIAL_VALUE = 11; - /** CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; */ - public static final int CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE_VALUE = 12; - /** CATEGORY_MEDIA = 13; */ - public static final int CATEGORY_MEDIA_VALUE = 13; - /** CATEGORY_PUBLIC_SECTOR = 14; */ - public static final int CATEGORY_PUBLIC_SECTOR_VALUE = 14; - /** CATEGORY_RETAIL = 15; */ - public static final int CATEGORY_RETAIL_VALUE = 15; - /** CATEGORY_SPORTS = 16; */ - public static final int CATEGORY_SPORTS_VALUE = 16; - /** CATEGORY_SCIENCE_AND_RESEARCH = 17; */ - public static final int CATEGORY_SCIENCE_AND_RESEARCH_VALUE = 17; - /** CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; */ - public static final int CATEGORY_TRANSPORTATION_AND_LOGISTICS_VALUE = 18; - /** CATEGORY_TRAVEL_AND_TOURISM = 19; */ - public static final int CATEGORY_TRAVEL_AND_TOURISM_VALUE = 19; - - 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 Category 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 Category forNumber(int value) { - switch (value) { - case 0: - return CATEGORY_UNSPECIFIED; - case 1: - return CATEGORY_OTHERS; - case 2: - return CATEGORY_ADVERTISING_AND_MARKETING; - case 3: - return CATEGORY_COMMERCE; - case 4: - return CATEGORY_CLIMATE_AND_ENVIRONMENT; - case 5: - return CATEGORY_DEMOGRAPHICS; - case 6: - return CATEGORY_ECONOMICS; - case 7: - return CATEGORY_EDUCATION; - case 8: - return CATEGORY_ENERGY; - case 9: - return CATEGORY_FINANCIAL; - case 10: - return CATEGORY_GAMING; - case 11: - return CATEGORY_GEOSPATIAL; - case 12: - return CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE; - case 13: - return CATEGORY_MEDIA; - case 14: - return CATEGORY_PUBLIC_SECTOR; - case 15: - return CATEGORY_RETAIL; - case 16: - return CATEGORY_SPORTS; - case 17: - return CATEGORY_SCIENCE_AND_RESEARCH; - case 18: - return CATEGORY_TRANSPORTATION_AND_LOGISTICS; - case 19: - return CATEGORY_TRAVEL_AND_TOURISM; - 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 Category findValueByNumber(int number) { - return Category.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.Listing.getDescriptor() - .getEnumTypes() - .get(1); - } - - private static final Category[] VALUES = values(); - - public static Category 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 Category(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.analyticshub.v1.Listing.Category) - } - - public interface BigQueryDatasetSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Resource name of the dataset source for this listing.
-     * e.g. `projects/myproject/datasets/123`
-     * 
- * - * string dataset = 1 [(.google.api.resource_reference) = { ... } - * - * @return The dataset. - */ - java.lang.String getDataset(); - /** - * - * - *
-     * Resource name of the dataset source for this listing.
-     * e.g. `projects/myproject/datasets/123`
-     * 
- * - * string dataset = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString getDatasetBytes(); - } - /** - * - * - *
-   * A reference to a shared dataset. It is an existing BigQuery dataset with a
-   * collection of objects such as tables and views that you want to share
-   * with subscribers.
-   * When subscriber's subscribe to a listing, Analytics Hub creates a linked
-   * dataset in
-   * the subscriber's project. A Linked dataset is an opaque, read-only BigQuery
-   * dataset that serves as a _symbolic link_ to a shared dataset.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource} - */ - public static final class BigQueryDatasetSource extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - BigQueryDatasetSourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use BigQueryDatasetSource.newBuilder() to construct. - private BigQueryDatasetSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BigQueryDatasetSource() { - dataset_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BigQueryDatasetSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.class, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder - .class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - * - * - *
-     * Resource name of the dataset source for this listing.
-     * e.g. `projects/myproject/datasets/123`
-     * 
- * - * string dataset = 1 [(.google.api.resource_reference) = { ... } - * - * @return The dataset. - */ - @java.lang.Override - 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; - } - } - /** - * - * - *
-     * Resource name of the dataset source for this listing.
-     * e.g. `projects/myproject/datasets/123`
-     * 
- * - * string dataset = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for dataset. - */ - @java.lang.Override - 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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource other = - (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) obj; - - if (!getDataset().equals(other.getDataset())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource 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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - 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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - java.io.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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A reference to a shared dataset. It is an existing BigQuery dataset with a
-     * collection of objects such as tables and views that you want to share
-     * with subscribers.
-     * When subscriber's subscribe to a listing, Analytics Hub creates a linked
-     * dataset in
-     * the subscriber's project. A Linked dataset is an opaque, read-only BigQuery
-     * dataset that serves as a _symbolic link_ to a shared dataset.
-     * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.class, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder - .class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_BigQueryDatasetSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource build() { - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource result = - new com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource(this); - result.dataset_ = dataset_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance()) return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - dataset_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object dataset_ = ""; - /** - * - * - *
-       * Resource name of the dataset source for this listing.
-       * e.g. `projects/myproject/datasets/123`
-       * 
- * - * string dataset = 1 [(.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; - } - } - /** - * - * - *
-       * Resource name of the dataset source for this listing.
-       * e.g. `projects/myproject/datasets/123`
-       * 
- * - * string dataset = 1 [(.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; - } - } - /** - * - * - *
-       * Resource name of the dataset source for this listing.
-       * e.g. `projects/myproject/datasets/123`
-       * 
- * - * string dataset = 1 [(.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; - } - /** - * - * - *
-       * Resource name of the dataset source for this listing.
-       * e.g. `projects/myproject/datasets/123`
-       * 
- * - * string dataset = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - * - * - *
-       * Resource name of the dataset source for this listing.
-       * e.g. `projects/myproject/datasets/123`
-       * 
- * - * string dataset = 1 [(.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; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - private static final com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDatasetSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - - public enum SourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BIGQUERY_DATASET(6), - SOURCE_NOT_SET(0); - private final int value; - - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 6: - return BIGQUERY_DATASET; - case 0: - return SOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - public static final int BIGQUERY_DATASET_FIELD_NUMBER = 6; - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the bigqueryDataset field is set. - */ - @java.lang.Override - public boolean hasBigqueryDataset() { - return sourceCase_ == 6; - } - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The bigqueryDataset. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - getBigqueryDataset() { - if (sourceCase_ == 6) { - return (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_; - } - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder - getBigqueryDatasetOrBuilder() { - if (sourceCase_ == 6) { - return (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_; - } - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. Human-readable display name of the listing. The display name must contain
-   * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-   * ( ), ampersands (&) and can't start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Human-readable display name of the listing. The display name must contain
-   * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-   * ( ), ampersands (&) and can't start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Optional. Short description of the listing. The description must not contain
-   * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Short description of the listing. The description must not contain
-   * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRIMARY_CONTACT_FIELD_NUMBER = 4; - private volatile java.lang.Object primaryContact_; - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the listing.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - @java.lang.Override - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the listing.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DOCUMENTATION_FIELD_NUMBER = 5; - private volatile java.lang.Object documentation_; - /** - * - * - *
-   * Optional. Documentation describing the listing.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - @java.lang.Override - public java.lang.String getDocumentation() { - java.lang.Object ref = documentation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentation_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Documentation describing the listing.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentationBytes() { - java.lang.Object ref = documentation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 7; - private int state_; - /** - * - * - *
-   * Output only. Current state of the listing.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. Current state of the listing.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.analyticshub.v1.Listing.State result = - com.google.cloud.bigquery.analyticshub.v1.Listing.State.valueOf(state_); - return result == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.State.UNRECOGNIZED - : result; - } - - public static final int ICON_FIELD_NUMBER = 8; - private com.google.protobuf.ByteString icon_; - /** - * - * - *
-   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
-   * Expected image dimensions are 512x512 pixels, however the API only
-   * performs validation on size of the encoded data.
-   * Note: For byte fields, the contents of the field are base64-encoded (which
-   * increases the size of the data by 33-36%) when using JSON on the wire.
-   * 
- * - * bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIcon() { - return icon_; - } - - public static final int DATA_PROVIDER_FIELD_NUMBER = 9; - private com.google.cloud.bigquery.analyticshub.v1.DataProvider dataProvider_; - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dataProvider field is set. - */ - @java.lang.Override - public boolean hasDataProvider() { - return dataProvider_ != null; - } - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dataProvider. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataProvider getDataProvider() { - return dataProvider_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataProvider.getDefaultInstance() - : dataProvider_; - } - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder - getDataProviderOrBuilder() { - return getDataProvider(); - } - - public static final int CATEGORIES_FIELD_NUMBER = 10; - private java.util.List categories_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.bigquery.analyticshub.v1.Listing.Category> - categories_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.bigquery.analyticshub.v1.Listing.Category>() { - public com.google.cloud.bigquery.analyticshub.v1.Listing.Category convert( - java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.analyticshub.v1.Listing.Category result = - com.google.cloud.bigquery.analyticshub.v1.Listing.Category.valueOf(from); - return result == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.Category.UNRECOGNIZED - : result; - } - }; - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the categories. - */ - @java.lang.Override - public java.util.List - getCategoriesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.bigquery.analyticshub.v1.Listing.Category>( - categories_, categories_converter_); - } - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of categories. - */ - @java.lang.Override - public int getCategoriesCount() { - return categories_.size(); - } - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The categories at the given index. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.Category getCategories(int index) { - return categories_converter_.convert(categories_.get(index)); - } - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for categories. - */ - @java.lang.Override - public java.util.List getCategoriesValueList() { - return categories_; - } - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of categories at the given index. - */ - @java.lang.Override - public int getCategoriesValue(int index) { - return categories_.get(index); - } - - private int categoriesMemoizedSerializedSize; - - public static final int PUBLISHER_FIELD_NUMBER = 11; - private com.google.cloud.bigquery.analyticshub.v1.Publisher publisher_; - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the publisher field is set. - */ - @java.lang.Override - public boolean hasPublisher() { - return publisher_ != null; - } - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The publisher. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Publisher getPublisher() { - return publisher_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Publisher.getDefaultInstance() - : publisher_; - } - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder getPublisherOrBuilder() { - return getPublisher(); - } - - public static final int REQUEST_ACCESS_FIELD_NUMBER = 12; - private volatile java.lang.Object requestAccess_; - /** - * - * - *
-   * Optional. Email or URL of the request access of the listing.
-   * Subscribers can use this reference to request access.
-   * Max Length: 1000 bytes.
-   * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestAccess. - */ - @java.lang.Override - public java.lang.String getRequestAccess() { - java.lang.Object ref = requestAccess_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestAccess_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Email or URL of the request access of the listing.
-   * Subscribers can use this reference to request access.
-   * Max Length: 1000 bytes.
-   * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestAccess. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestAccessBytes() { - java.lang.Object ref = requestAccess_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestAccess_ = 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 { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, primaryContact_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, documentation_); - } - if (sourceCase_ == 6) { - output.writeMessage( - 6, (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_); - } - if (state_ - != com.google.cloud.bigquery.analyticshub.v1.Listing.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(7, state_); - } - if (!icon_.isEmpty()) { - output.writeBytes(8, icon_); - } - if (dataProvider_ != null) { - output.writeMessage(9, getDataProvider()); - } - if (getCategoriesList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(categoriesMemoizedSerializedSize); - } - for (int i = 0; i < categories_.size(); i++) { - output.writeEnumNoTag(categories_.get(i)); - } - if (publisher_ != null) { - output.writeMessage(11, getPublisher()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestAccess_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, requestAccess_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, primaryContact_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, documentation_); - } - if (sourceCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_); - } - if (state_ - != com.google.cloud.bigquery.analyticshub.v1.Listing.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); - } - if (!icon_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(8, icon_); - } - if (dataProvider_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDataProvider()); - } - { - int dataSize = 0; - for (int i = 0; i < categories_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(categories_.get(i)); - } - size += dataSize; - if (!getCategoriesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); - } - categoriesMemoizedSerializedSize = dataSize; - } - if (publisher_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPublisher()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestAccess_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, requestAccess_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.Listing)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.Listing other = - (com.google.cloud.bigquery.analyticshub.v1.Listing) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getPrimaryContact().equals(other.getPrimaryContact())) return false; - if (!getDocumentation().equals(other.getDocumentation())) return false; - if (state_ != other.state_) return false; - if (!getIcon().equals(other.getIcon())) return false; - if (hasDataProvider() != other.hasDataProvider()) return false; - if (hasDataProvider()) { - if (!getDataProvider().equals(other.getDataProvider())) return false; - } - if (!categories_.equals(other.categories_)) return false; - if (hasPublisher() != other.hasPublisher()) return false; - if (hasPublisher()) { - if (!getPublisher().equals(other.getPublisher())) return false; - } - if (!getRequestAccess().equals(other.getRequestAccess())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 6: - if (!getBigqueryDataset().equals(other.getBigqueryDataset())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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(); - hash = (37 * hash) + PRIMARY_CONTACT_FIELD_NUMBER; - hash = (53 * hash) + getPrimaryContact().hashCode(); - hash = (37 * hash) + DOCUMENTATION_FIELD_NUMBER; - hash = (53 * hash) + getDocumentation().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + ICON_FIELD_NUMBER; - hash = (53 * hash) + getIcon().hashCode(); - if (hasDataProvider()) { - hash = (37 * hash) + DATA_PROVIDER_FIELD_NUMBER; - hash = (53 * hash) + getDataProvider().hashCode(); - } - if (getCategoriesCount() > 0) { - hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + categories_.hashCode(); - } - if (hasPublisher()) { - hash = (37 * hash) + PUBLISHER_FIELD_NUMBER; - hash = (53 * hash) + getPublisher().hashCode(); - } - hash = (37 * hash) + REQUEST_ACCESS_FIELD_NUMBER; - hash = (53 * hash) + getRequestAccess().hashCode(); - switch (sourceCase_) { - case 6: - hash = (37 * hash) + BIGQUERY_DATASET_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDataset().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing 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.bigquery.analyticshub.v1.Listing parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - 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.bigquery.analyticshub.v1.Listing parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - java.io.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.bigquery.analyticshub.v1.Listing parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.Listing parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.Listing prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 listing is what gets published into a data exchange that a subscriber can
-   * subscribe to. It contains a reference to the data source along with
-   * descriptive information that will help subscribers find and subscribe the
-   * data.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Listing} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.Listing) - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Listing.class, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.Listing.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (bigqueryDatasetBuilder_ != null) { - bigqueryDatasetBuilder_.clear(); - } - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - primaryContact_ = ""; - - documentation_ = ""; - - state_ = 0; - - icon_ = com.google.protobuf.ByteString.EMPTY; - - if (dataProviderBuilder_ == null) { - dataProvider_ = null; - } else { - dataProvider_ = null; - dataProviderBuilder_ = null; - } - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (publisherBuilder_ == null) { - publisher_ = null; - } else { - publisher_ = null; - publisherBuilder_ = null; - } - requestAccess_ = ""; - - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Listing_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing build() { - com.google.cloud.bigquery.analyticshub.v1.Listing result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.Listing result = - new com.google.cloud.bigquery.analyticshub.v1.Listing(this); - int from_bitField0_ = bitField0_; - if (sourceCase_ == 6) { - if (bigqueryDatasetBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = bigqueryDatasetBuilder_.build(); - } - } - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.primaryContact_ = primaryContact_; - result.documentation_ = documentation_; - result.state_ = state_; - result.icon_ = icon_; - if (dataProviderBuilder_ == null) { - result.dataProvider_ = dataProvider_; - } else { - result.dataProvider_ = dataProviderBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.categories_ = categories_; - if (publisherBuilder_ == null) { - result.publisher_ = publisher_; - } else { - result.publisher_ = publisherBuilder_.build(); - } - result.requestAccess_ = requestAccess_; - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.bigquery.analyticshub.v1.Listing) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.Listing) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.Listing other) { - if (other == com.google.cloud.bigquery.analyticshub.v1.Listing.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.getPrimaryContact().isEmpty()) { - primaryContact_ = other.primaryContact_; - onChanged(); - } - if (!other.getDocumentation().isEmpty()) { - documentation_ = other.documentation_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.getIcon() != com.google.protobuf.ByteString.EMPTY) { - setIcon(other.getIcon()); - } - if (other.hasDataProvider()) { - mergeDataProvider(other.getDataProvider()); - } - if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); - } - onChanged(); - } - if (other.hasPublisher()) { - mergePublisher(other.getPublisher()); - } - if (!other.getRequestAccess().isEmpty()) { - requestAccess_ = other.requestAccess_; - onChanged(); - } - switch (other.getSourceCase()) { - case BIGQUERY_DATASET: - { - mergeBigqueryDataset(other.getBigqueryDataset()); - break; - } - case SOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - primaryContact_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - documentation_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 50: - { - input.readMessage(getBigqueryDatasetFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 6; - break; - } // case 50 - case 56: - { - state_ = input.readEnum(); - - break; - } // case 56 - case 66: - { - icon_ = input.readBytes(); - - break; - } // case 66 - case 74: - { - input.readMessage(getDataProviderFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 74 - case 80: - { - int tmpRaw = input.readEnum(); - ensureCategoriesIsMutable(); - categories_.add(tmpRaw); - break; - } // case 80 - case 82: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureCategoriesIsMutable(); - categories_.add(tmpRaw); - } - input.popLimit(oldLimit); - break; - } // case 82 - case 90: - { - input.readMessage(getPublisherFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 90 - case 98: - { - requestAccess_ = input.readStringRequireUtf8(); - - break; - } // case 98 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder> - bigqueryDatasetBuilder_; - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the bigqueryDataset field is set. - */ - @java.lang.Override - public boolean hasBigqueryDataset() { - return sourceCase_ == 6; - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The bigqueryDataset. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - getBigqueryDataset() { - if (bigqueryDatasetBuilder_ == null) { - if (sourceCase_ == 6) { - return (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_; - } - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } else { - if (sourceCase_ == 6) { - return bigqueryDatasetBuilder_.getMessage(); - } - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBigqueryDataset( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource value) { - if (bigqueryDatasetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - bigqueryDatasetBuilder_.setMessage(value); - } - sourceCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBigqueryDataset( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder - builderForValue) { - if (bigqueryDatasetBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDatasetBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBigqueryDataset( - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource value) { - if (bigqueryDatasetBuilder_ == null) { - if (sourceCase_ == 6 - && source_ - != com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance()) { - source_ = - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.newBuilder( - (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) - source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 6) { - bigqueryDatasetBuilder_.mergeFrom(value); - } else { - bigqueryDatasetBuilder_.setMessage(value); - } - } - sourceCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBigqueryDataset() { - if (bigqueryDatasetBuilder_ == null) { - if (sourceCase_ == 6) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 6) { - sourceCase_ = 0; - source_ = null; - } - bigqueryDatasetBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder - getBigqueryDatasetBuilder() { - return getBigqueryDatasetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder - getBigqueryDatasetOrBuilder() { - if ((sourceCase_ == 6) && (bigqueryDatasetBuilder_ != null)) { - return bigqueryDatasetBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 6) { - return (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_; - } - return com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. Shared dataset i.e. BigQuery dataset source.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder> - getBigqueryDatasetFieldBuilder() { - if (bigqueryDatasetBuilder_ == null) { - if (!(sourceCase_ == 6)) { - source_ = - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource - .getDefaultInstance(); - } - bigqueryDatasetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.Builder, - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder>( - (com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 6; - onChanged(); - ; - return bigqueryDatasetBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the listing.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Required. Human-readable display name of the listing. The display name must contain
-     * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-     * ( ), ampersands (&) and can't start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the listing. The display name must contain
-     * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-     * ( ), ampersands (&) and can't start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the listing. The display name must contain
-     * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-     * ( ), ampersands (&) and can't start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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. Human-readable display name of the listing. The display name must contain
-     * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-     * ( ), ampersands (&) and can't start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Human-readable display name of the listing. The display name must contain
-     * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-     * ( ), ampersands (&) and can't start or end with spaces.
-     * Default value is an empty string.
-     * Max length: 63 bytes.
-     * 
- * - * string display_name = 2 [(.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; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * Optional. Short description of the listing. The description must not contain
-     * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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. Short description of the listing. The description must not contain
-     * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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. Short description of the listing. The description must not contain
-     * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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. Short description of the listing. The description must not contain
-     * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Short description of the listing. The description must not contain
-     * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-     * new lines (LF), carriage returns (CR), and page breaks (FF).
-     * Default value is an empty string.
-     * Max length: 2000 bytes.
-     * 
- * - * string description = 3 [(.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 primaryContact_ = ""; - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the listing.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the listing.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the listing.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContact(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - primaryContact_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the listing.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPrimaryContact() { - - primaryContact_ = getDefaultInstance().getPrimaryContact(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the primary point of contact of the listing.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContactBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - primaryContact_ = value; - onChanged(); - return this; - } - - private java.lang.Object documentation_ = ""; - /** - * - * - *
-     * Optional. Documentation describing the listing.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - public java.lang.String getDocumentation() { - java.lang.Object ref = documentation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Documentation describing the listing.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - public com.google.protobuf.ByteString getDocumentationBytes() { - java.lang.Object ref = documentation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Documentation describing the listing.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The documentation to set. - * @return This builder for chaining. - */ - public Builder setDocumentation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - documentation_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Documentation describing the listing.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDocumentation() { - - documentation_ = getDefaultInstance().getDocumentation(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Documentation describing the listing.
-     * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for documentation to set. - * @return This builder for chaining. - */ - public Builder setDocumentationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - documentation_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. Current state of the listing.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. Current state of the listing.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Current state of the listing.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.bigquery.analyticshub.v1.Listing.State result = - com.google.cloud.bigquery.analyticshub.v1.Listing.State.valueOf(state_); - return result == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Current state of the listing.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.bigquery.analyticshub.v1.Listing.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Current state of the listing.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString icon_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the contents of the field are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIcon() { - return icon_; - } - /** - * - * - *
-     * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the contents of the field are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The icon to set. - * @return This builder for chaining. - */ - public Builder setIcon(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - icon_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
-     * Expected image dimensions are 512x512 pixels, however the API only
-     * performs validation on size of the encoded data.
-     * Note: For byte fields, the contents of the field are base64-encoded (which
-     * increases the size of the data by 33-36%) when using JSON on the wire.
-     * 
- * - * bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearIcon() { - - icon_ = getDefaultInstance().getIcon(); - onChanged(); - return this; - } - - private com.google.cloud.bigquery.analyticshub.v1.DataProvider dataProvider_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataProvider, - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder> - dataProviderBuilder_; - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dataProvider field is set. - */ - public boolean hasDataProvider() { - return dataProviderBuilder_ != null || dataProvider_ != null; - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dataProvider. - */ - public com.google.cloud.bigquery.analyticshub.v1.DataProvider getDataProvider() { - if (dataProviderBuilder_ == null) { - return dataProvider_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataProvider.getDefaultInstance() - : dataProvider_; - } else { - return dataProviderBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDataProvider(com.google.cloud.bigquery.analyticshub.v1.DataProvider value) { - if (dataProviderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataProvider_ = value; - onChanged(); - } else { - dataProviderBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDataProvider( - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder builderForValue) { - if (dataProviderBuilder_ == null) { - dataProvider_ = builderForValue.build(); - onChanged(); - } else { - dataProviderBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeDataProvider(com.google.cloud.bigquery.analyticshub.v1.DataProvider value) { - if (dataProviderBuilder_ == null) { - if (dataProvider_ != null) { - dataProvider_ = - com.google.cloud.bigquery.analyticshub.v1.DataProvider.newBuilder(dataProvider_) - .mergeFrom(value) - .buildPartial(); - } else { - dataProvider_ = value; - } - onChanged(); - } else { - dataProviderBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearDataProvider() { - if (dataProviderBuilder_ == null) { - dataProvider_ = null; - onChanged(); - } else { - dataProvider_ = null; - dataProviderBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder getDataProviderBuilder() { - - onChanged(); - return getDataProviderFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder - getDataProviderOrBuilder() { - if (dataProviderBuilder_ != null) { - return dataProviderBuilder_.getMessageOrBuilder(); - } else { - return dataProvider_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataProvider.getDefaultInstance() - : dataProvider_; - } - } - /** - * - * - *
-     * Optional. Details of the data provider who owns the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataProvider, - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder> - getDataProviderFieldBuilder() { - if (dataProviderBuilder_ == null) { - dataProviderBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataProvider, - com.google.cloud.bigquery.analyticshub.v1.DataProvider.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder>( - getDataProvider(), getParentForChildren(), isClean()); - dataProvider_ = null; - } - return dataProviderBuilder_; - } - - private java.util.List categories_ = java.util.Collections.emptyList(); - - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the categories. - */ - public java.util.List - getCategoriesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.bigquery.analyticshub.v1.Listing.Category>( - categories_, categories_converter_); - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of categories. - */ - public int getCategoriesCount() { - return categories_.size(); - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The categories at the given index. - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Category getCategories(int index) { - return categories_converter_.convert(categories_.get(index)); - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The categories to set. - * @return This builder for chaining. - */ - public Builder setCategories( - int index, com.google.cloud.bigquery.analyticshub.v1.Listing.Category value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The categories to add. - * @return This builder for chaining. - */ - public Builder addCategories(com.google.cloud.bigquery.analyticshub.v1.Listing.Category value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The categories to add. - * @return This builder for chaining. - */ - public Builder addAllCategories( - java.lang.Iterable - values) { - ensureCategoriesIsMutable(); - for (com.google.cloud.bigquery.analyticshub.v1.Listing.Category value : values) { - categories_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearCategories() { - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for categories. - */ - public java.util.List getCategoriesValueList() { - return java.util.Collections.unmodifiableList(categories_); - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of categories at the given index. - */ - public int getCategoriesValue(int index) { - return categories_.get(index); - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for categories to set. - * @return This builder for chaining. - */ - public Builder setCategoriesValue(int index, int value) { - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for categories to add. - * @return This builder for chaining. - */ - public Builder addCategoriesValue(int value) { - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Categories of the listing. Up to two categories are allowed.
-     * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The enum numeric values on the wire for categories to add. - * @return This builder for chaining. - */ - public Builder addAllCategoriesValue(java.lang.Iterable values) { - ensureCategoriesIsMutable(); - for (int value : values) { - categories_.add(value); - } - onChanged(); - return this; - } - - private com.google.cloud.bigquery.analyticshub.v1.Publisher publisher_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Publisher, - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder, - com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder> - publisherBuilder_; - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the publisher field is set. - */ - public boolean hasPublisher() { - return publisherBuilder_ != null || publisher_ != null; - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The publisher. - */ - public com.google.cloud.bigquery.analyticshub.v1.Publisher getPublisher() { - if (publisherBuilder_ == null) { - return publisher_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Publisher.getDefaultInstance() - : publisher_; - } else { - return publisherBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublisher(com.google.cloud.bigquery.analyticshub.v1.Publisher value) { - if (publisherBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publisher_ = value; - onChanged(); - } else { - publisherBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublisher( - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder builderForValue) { - if (publisherBuilder_ == null) { - publisher_ = builderForValue.build(); - onChanged(); - } else { - publisherBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePublisher(com.google.cloud.bigquery.analyticshub.v1.Publisher value) { - if (publisherBuilder_ == null) { - if (publisher_ != null) { - publisher_ = - com.google.cloud.bigquery.analyticshub.v1.Publisher.newBuilder(publisher_) - .mergeFrom(value) - .buildPartial(); - } else { - publisher_ = value; - } - onChanged(); - } else { - publisherBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPublisher() { - if (publisherBuilder_ == null) { - publisher_ = null; - onChanged(); - } else { - publisher_ = null; - publisherBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder getPublisherBuilder() { - - onChanged(); - return getPublisherFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder getPublisherOrBuilder() { - if (publisherBuilder_ != null) { - return publisherBuilder_.getMessageOrBuilder(); - } else { - return publisher_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Publisher.getDefaultInstance() - : publisher_; - } - } - /** - * - * - *
-     * Optional. Details of the publisher who owns the listing and who can share
-     * the source data.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Publisher, - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder, - com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder> - getPublisherFieldBuilder() { - if (publisherBuilder_ == null) { - publisherBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Publisher, - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder, - com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder>( - getPublisher(), getParentForChildren(), isClean()); - publisher_ = null; - } - return publisherBuilder_; - } - - private java.lang.Object requestAccess_ = ""; - /** - * - * - *
-     * Optional. Email or URL of the request access of the listing.
-     * Subscribers can use this reference to request access.
-     * Max Length: 1000 bytes.
-     * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestAccess. - */ - public java.lang.String getRequestAccess() { - java.lang.Object ref = requestAccess_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestAccess_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the request access of the listing.
-     * Subscribers can use this reference to request access.
-     * Max Length: 1000 bytes.
-     * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestAccess. - */ - public com.google.protobuf.ByteString getRequestAccessBytes() { - java.lang.Object ref = requestAccess_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestAccess_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the request access of the listing.
-     * Subscribers can use this reference to request access.
-     * Max Length: 1000 bytes.
-     * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestAccess to set. - * @return This builder for chaining. - */ - public Builder setRequestAccess(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestAccess_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the request access of the listing.
-     * Subscribers can use this reference to request access.
-     * Max Length: 1000 bytes.
-     * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestAccess() { - - requestAccess_ = getDefaultInstance().getRequestAccess(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the request access of the listing.
-     * Subscribers can use this reference to request access.
-     * Max Length: 1000 bytes.
-     * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestAccess to set. - * @return This builder for chaining. - */ - public Builder setRequestAccessBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestAccess_ = 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.bigquery.analyticshub.v1.Listing) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.Listing) - private static final com.google.cloud.bigquery.analyticshub.v1.Listing DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.Listing(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Listing getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Listing parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.Listing getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingName.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingName.java deleted file mode 100644 index b1be73460900..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingName.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.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; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ListingName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_DATA_EXCHANGE_LISTING = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String dataExchange; - private final String listing; - - @Deprecated - protected ListingName() { - project = null; - location = null; - dataExchange = null; - listing = null; - } - - private ListingName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataExchange = Preconditions.checkNotNull(builder.getDataExchange()); - listing = Preconditions.checkNotNull(builder.getListing()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataExchange() { - return dataExchange; - } - - public String getListing() { - return listing; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ListingName of( - String project, String location, String dataExchange, String listing) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataExchange(dataExchange) - .setListing(listing) - .build(); - } - - public static String format( - String project, String location, String dataExchange, String listing) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataExchange(dataExchange) - .setListing(listing) - .build() - .toString(); - } - - public static ListingName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_DATA_EXCHANGE_LISTING.validatedMatch( - formattedString, "ListingName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("data_exchange"), - matchMap.get("listing")); - } - - 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 (ListingName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_DATA_EXCHANGE_LISTING.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (dataExchange != null) { - fieldMapBuilder.put("data_exchange", dataExchange); - } - if (listing != null) { - fieldMapBuilder.put("listing", listing); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_DATA_EXCHANGE_LISTING.instantiate( - "project", - project, - "location", - location, - "data_exchange", - dataExchange, - "listing", - listing); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ListingName that = ((ListingName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.dataExchange, that.dataExchange) - && Objects.equals(this.listing, that.listing); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(dataExchange); - h *= 1000003; - h ^= Objects.hashCode(listing); - return h; - } - - /** - * Builder for - * projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}. - */ - public static class Builder { - private String project; - private String location; - private String dataExchange; - private String listing; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataExchange() { - return dataExchange; - } - - public String getListing() { - return listing; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setDataExchange(String dataExchange) { - this.dataExchange = dataExchange; - return this; - } - - public Builder setListing(String listing) { - this.listing = listing; - return this; - } - - private Builder(ListingName listingName) { - this.project = listingName.project; - this.location = listingName.location; - this.dataExchange = listingName.dataExchange; - this.listing = listingName.listing; - } - - public ListingName build() { - return new ListingName(this); - } - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingOrBuilder.java deleted file mode 100644 index e33d5191f04d..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/ListingOrBuilder.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface ListingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.Listing) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the bigqueryDataset field is set. - */ - boolean hasBigqueryDataset(); - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The bigqueryDataset. - */ - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource getBigqueryDataset(); - /** - * - * - *
-   * Required. Shared dataset i.e. BigQuery dataset source.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSourceOrBuilder - getBigqueryDatasetOrBuilder(); - - /** - * - * - *
-   * Output only. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the listing.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Human-readable display name of the listing. The display name must contain
-   * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-   * ( ), ampersands (&) and can't start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. Human-readable display name of the listing. The display name must contain
-   * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
-   * ( ), ampersands (&) and can't start or end with spaces.
-   * Default value is an empty string.
-   * Max length: 63 bytes.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Optional. Short description of the listing. The description must not contain
-   * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. Short description of the listing. The description must not contain
-   * Unicode non-characters and C0 and C1 control codes except tabs (HT),
-   * new lines (LF), carriage returns (CR), and page breaks (FF).
-   * Default value is an empty string.
-   * Max length: 2000 bytes.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the listing.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - java.lang.String getPrimaryContact(); - /** - * - * - *
-   * Optional. Email or URL of the primary point of contact of the listing.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - com.google.protobuf.ByteString getPrimaryContactBytes(); - - /** - * - * - *
-   * Optional. Documentation describing the listing.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The documentation. - */ - java.lang.String getDocumentation(); - /** - * - * - *
-   * Optional. Documentation describing the listing.
-   * 
- * - * string documentation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for documentation. - */ - com.google.protobuf.ByteString getDocumentationBytes(); - - /** - * - * - *
-   * Output only. Current state of the listing.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. Current state of the listing.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.bigquery.analyticshub.v1.Listing.State getState(); - - /** - * - * - *
-   * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
-   * Expected image dimensions are 512x512 pixels, however the API only
-   * performs validation on size of the encoded data.
-   * Note: For byte fields, the contents of the field are base64-encoded (which
-   * increases the size of the data by 33-36%) when using JSON on the wire.
-   * 
- * - * bytes icon = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The icon. - */ - com.google.protobuf.ByteString getIcon(); - - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dataProvider field is set. - */ - boolean hasDataProvider(); - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dataProvider. - */ - com.google.cloud.bigquery.analyticshub.v1.DataProvider getDataProvider(); - /** - * - * - *
-   * Optional. Details of the data provider who owns the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.DataProviderOrBuilder getDataProviderOrBuilder(); - - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the categories. - */ - java.util.List getCategoriesList(); - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of categories. - */ - int getCategoriesCount(); - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The categories at the given index. - */ - com.google.cloud.bigquery.analyticshub.v1.Listing.Category getCategories(int index); - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for categories. - */ - java.util.List getCategoriesValueList(); - /** - * - * - *
-   * Optional. Categories of the listing. Up to two categories are allowed.
-   * 
- * - * - * repeated .google.cloud.bigquery.analyticshub.v1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of categories at the given index. - */ - int getCategoriesValue(int index); - - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the publisher field is set. - */ - boolean hasPublisher(); - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The publisher. - */ - com.google.cloud.bigquery.analyticshub.v1.Publisher getPublisher(); - /** - * - * - *
-   * Optional. Details of the publisher who owns the listing and who can share
-   * the source data.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder getPublisherOrBuilder(); - - /** - * - * - *
-   * Optional. Email or URL of the request access of the listing.
-   * Subscribers can use this reference to request access.
-   * Max Length: 1000 bytes.
-   * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestAccess. - */ - java.lang.String getRequestAccess(); - /** - * - * - *
-   * Optional. Email or URL of the request access of the listing.
-   * Subscribers can use this reference to request access.
-   * Max Length: 1000 bytes.
-   * 
- * - * string request_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestAccess. - */ - com.google.protobuf.ByteString getRequestAccessBytes(); - - public com.google.cloud.bigquery.analyticshub.v1.Listing.SourceCase getSourceCase(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/LocationName.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/LocationName.java deleted file mode 100644 index ed075ad23fb8..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.bigquery.analyticshub.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; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Publisher.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Publisher.java deleted file mode 100644 index 52ac87e7f288..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/Publisher.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Contains details of the listing publisher.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Publisher} - */ -public final class Publisher extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.Publisher) - PublisherOrBuilder { - private static final long serialVersionUID = 0L; - // Use Publisher.newBuilder() to construct. - private Publisher(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Publisher() { - name_ = ""; - primaryContact_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Publisher(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Publisher.class, - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Optional. Name of the listing publisher.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Name of the listing publisher.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRIMARY_CONTACT_FIELD_NUMBER = 2; - private volatile java.lang.Object primaryContact_; - /** - * - * - *
-   * Optional. Email or URL of the listing publisher.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - @java.lang.Override - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Email or URL of the listing publisher.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, primaryContact_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryContact_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, primaryContact_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.Publisher)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.Publisher other = - (com.google.cloud.bigquery.analyticshub.v1.Publisher) obj; - - if (!getName().equals(other.getName())) return false; - if (!getPrimaryContact().equals(other.getPrimaryContact())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PRIMARY_CONTACT_FIELD_NUMBER; - hash = (53 * hash) + getPrimaryContact().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher 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.bigquery.analyticshub.v1.Publisher parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - 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.bigquery.analyticshub.v1.Publisher parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - java.io.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.bigquery.analyticshub.v1.Publisher parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.Publisher parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.Publisher prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 details of the listing publisher.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.Publisher} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.Publisher) - com.google.cloud.bigquery.analyticshub.v1.PublisherOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.Publisher.class, - com.google.cloud.bigquery.analyticshub.v1.Publisher.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.Publisher.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - primaryContact_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_Publisher_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Publisher getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.Publisher.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Publisher build() { - com.google.cloud.bigquery.analyticshub.v1.Publisher result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Publisher buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.Publisher result = - new com.google.cloud.bigquery.analyticshub.v1.Publisher(this); - result.name_ = name_; - result.primaryContact_ = primaryContact_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.Publisher) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.Publisher) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.Publisher other) { - if (other == com.google.cloud.bigquery.analyticshub.v1.Publisher.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getPrimaryContact().isEmpty()) { - primaryContact_ = other.primaryContact_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - primaryContact_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Optional. Name of the listing publisher.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Name of the listing publisher.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Name of the listing publisher.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. Name of the listing publisher.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Name of the listing publisher.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 primaryContact_ = ""; - /** - * - * - *
-     * Optional. Email or URL of the listing publisher.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - public java.lang.String getPrimaryContact() { - java.lang.Object ref = primaryContact_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryContact_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the listing publisher.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - public com.google.protobuf.ByteString getPrimaryContactBytes() { - java.lang.Object ref = primaryContact_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryContact_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Email or URL of the listing publisher.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContact(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - primaryContact_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the listing publisher.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPrimaryContact() { - - primaryContact_ = getDefaultInstance().getPrimaryContact(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Email or URL of the listing publisher.
-     * Max Length: 1000 bytes.
-     * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for primaryContact to set. - * @return This builder for chaining. - */ - public Builder setPrimaryContactBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - primaryContact_ = 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.bigquery.analyticshub.v1.Publisher) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.Publisher) - private static final com.google.cloud.bigquery.analyticshub.v1.Publisher DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.Publisher(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.Publisher getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Publisher parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.Publisher getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/PublisherOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/PublisherOrBuilder.java deleted file mode 100644 index 443ab98a3ab3..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/PublisherOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface PublisherOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.Publisher) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Name of the listing publisher.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Optional. Name of the listing publisher.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. Email or URL of the listing publisher.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The primaryContact. - */ - java.lang.String getPrimaryContact(); - /** - * - * - *
-   * Optional. Email or URL of the listing publisher.
-   * Max Length: 1000 bytes.
-   * 
- * - * string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for primaryContact. - */ - com.google.protobuf.ByteString getPrimaryContactBytes(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequest.java deleted file mode 100644 index ceb9aed89436..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequest.java +++ /dev/null @@ -1,1037 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for subscribing to a listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest} - */ -public final class SubscribeListingRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) - SubscribeListingRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubscribeListingRequest.newBuilder() to construct. - private SubscribeListingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SubscribeListingRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubscribeListingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_DATASET(3), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(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 DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 3: - return DESTINATION_DATASET; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_DATASET_FIELD_NUMBER = 3; - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * @return Whether the destinationDataset field is set. - */ - @java.lang.Override - public boolean hasDestinationDataset() { - return destinationCase_ == 3; - } - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * @return The destinationDataset. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset getDestinationDataset() { - if (destinationCase_ == 3) { - return (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_; - } - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder - getDestinationDatasetOrBuilder() { - if (destinationCase_ == 3) { - return (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_; - } - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the listing that you want to subscribe to.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Resource name of the listing that you want to subscribe to.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (destinationCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (destinationCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.SubscribeListingRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest other = - (com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 3: - if (!getDestinationDataset().equals(other.getDestinationDataset())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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(); - switch (destinationCase_) { - case 3: - hash = (37 * hash) + DESTINATION_DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDestinationDataset().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest 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.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - 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.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.SubscribeListingRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.SubscribeListingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for subscribing to a listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (destinationDatasetBuilder_ != null) { - destinationDatasetBuilder_.clear(); - } - name_ = ""; - - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest build() { - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest result = - new com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest(this); - if (destinationCase_ == 3) { - if (destinationDatasetBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = destinationDatasetBuilder_.build(); - } - } - result.name_ = name_; - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.bigquery.analyticshub.v1.SubscribeListingRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - switch (other.getDestinationCase()) { - case DESTINATION_DATASET: - { - mergeDestinationDataset(other.getDestinationDataset()); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - input.readMessage( - getDestinationDatasetFieldBuilder().getBuilder(), extensionRegistry); - destinationCase_ = 3; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset, - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder> - destinationDatasetBuilder_; - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * - * @return Whether the destinationDataset field is set. - */ - @java.lang.Override - public boolean hasDestinationDataset() { - return destinationCase_ == 3; - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * - * @return The destinationDataset. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset getDestinationDataset() { - if (destinationDatasetBuilder_ == null) { - if (destinationCase_ == 3) { - return (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_; - } - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } else { - if (destinationCase_ == 3) { - return destinationDatasetBuilder_.getMessage(); - } - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - public Builder setDestinationDataset( - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset value) { - if (destinationDatasetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - destinationDatasetBuilder_.setMessage(value); - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - public Builder setDestinationDataset( - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder builderForValue) { - if (destinationDatasetBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - destinationDatasetBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - public Builder mergeDestinationDataset( - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset value) { - if (destinationDatasetBuilder_ == null) { - if (destinationCase_ == 3 - && destination_ - != com.google.cloud.bigquery.analyticshub.v1.DestinationDataset - .getDefaultInstance()) { - destination_ = - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.newBuilder( - (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 3) { - destinationDatasetBuilder_.mergeFrom(value); - } else { - destinationDatasetBuilder_.setMessage(value); - } - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - public Builder clearDestinationDataset() { - if (destinationDatasetBuilder_ == null) { - if (destinationCase_ == 3) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 3) { - destinationCase_ = 0; - destination_ = null; - } - destinationDatasetBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder - getDestinationDatasetBuilder() { - return getDestinationDatasetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder - getDestinationDatasetOrBuilder() { - if ((destinationCase_ == 3) && (destinationDatasetBuilder_ != null)) { - return destinationDatasetBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 3) { - return (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_; - } - return com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - } - /** - * - * - *
-     * BigQuery destination dataset to create for the subscriber.
-     * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset, - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder> - getDestinationDatasetFieldBuilder() { - if (destinationDatasetBuilder_ == null) { - if (!(destinationCase_ == 3)) { - destination_ = - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.getDefaultInstance(); - } - destinationDatasetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset, - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset.Builder, - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder>( - (com.google.cloud.bigquery.analyticshub.v1.DestinationDataset) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 3; - onChanged(); - ; - return destinationDatasetBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the listing that you want to subscribe to.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Resource name of the listing that you want to subscribe to.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Resource name of the listing that you want to subscribe to.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of the listing that you want to subscribe to.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of the listing that you want to subscribe to.
-     * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-     * 
- * - * - * 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.bigquery.analyticshub.v1.SubscribeListingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubscribeListingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.SubscribeListingRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequestOrBuilder.java deleted file mode 100644 index 30a4342d2603..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface SubscribeListingRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * @return Whether the destinationDataset field is set. - */ - boolean hasDestinationDataset(); - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - * - * @return The destinationDataset. - */ - com.google.cloud.bigquery.analyticshub.v1.DestinationDataset getDestinationDataset(); - /** - * - * - *
-   * BigQuery destination dataset to create for the subscriber.
-   * 
- * - * .google.cloud.bigquery.analyticshub.v1.DestinationDataset destination_dataset = 3; - */ - com.google.cloud.bigquery.analyticshub.v1.DestinationDatasetOrBuilder - getDestinationDatasetOrBuilder(); - - /** - * - * - *
-   * Required. Resource name of the listing that you want to subscribe to.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the listing that you want to subscribe to.
-   * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest.DestinationCase - getDestinationCase(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponse.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponse.java deleted file mode 100644 index d5bbdbd9c3d0..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponse.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for response when you subscribe to a listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse} - */ -public final class SubscribeListingResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) - SubscribeListingResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubscribeListingResponse.newBuilder() to construct. - private SubscribeListingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SubscribeListingResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubscribeListingResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.class, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.SubscribeListingResponse)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse other = - (com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse 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.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - 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.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - java.io.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.bigquery.analyticshub.v1.SubscribeListingResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.SubscribeListingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for response when you subscribe to a listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.class, - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_SubscribeListingResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse build() { - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse result = - new com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.SubscribeListingResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) - private static final com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubscribeListingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.SubscribeListingResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponseOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponseOrBuilder.java deleted file mode 100644 index 18ef5218a150..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/SubscribeListingResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface SubscribeListingResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequest.java deleted file mode 100644 index 6a33d85a0932..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequest.java +++ /dev/null @@ -1,1040 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for updating a data exchange.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest} - */ -public final class UpdateDataExchangeRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) - UpdateDataExchangeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateDataExchangeRequest.newBuilder() to construct. - private UpdateDataExchangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateDataExchangeRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateDataExchangeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int DATA_EXCHANGE_FIELD_NUMBER = 2; - private com.google.cloud.bigquery.analyticshub.v1.DataExchange dataExchange_; - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - @java.lang.Override - public boolean hasDataExchange() { - return dataExchange_ != null; - } - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange() { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangeOrBuilder() { - return getDataExchange(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (dataExchange_ != null) { - output.writeMessage(2, getDataExchange()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (dataExchange_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataExchange()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.UpdateDataExchangeRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest other = - (com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasDataExchange() != other.hasDataExchange()) return false; - if (hasDataExchange()) { - if (!getDataExchange().equals(other.getDataExchange())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasDataExchange()) { - hash = (37 * hash) + DATA_EXCHANGE_FIELD_NUMBER; - hash = (53 * hash) + getDataExchange().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest 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.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - 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.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.UpdateDataExchangeRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.UpdateDataExchangeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for updating a data exchange.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.class, - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.Builder.class); - } - - // Construct using - // com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - if (dataExchangeBuilder_ == null) { - dataExchange_ = null; - } else { - dataExchange_ = null; - dataExchangeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateDataExchangeRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest build() { - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest result = - new com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest(this); - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - if (dataExchangeBuilder_ == null) { - result.dataExchange_ = dataExchange_; - } else { - result.dataExchange_ = dataExchangeBuilder_.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.bigquery.analyticshub.v1.UpdateDataExchangeRequest) { - return mergeFrom( - (com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - .getDefaultInstance()) return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasDataExchange()) { - mergeDataExchange(other.getDataExchange()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getDataExchangeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - 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_; - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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(); - } - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the data exchange
-     * resource. The fields specified in the
-     * `updateMask` are relative to the resource and are not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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_; - } - - private com.google.cloud.bigquery.analyticshub.v1.DataExchange dataExchange_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - dataExchangeBuilder_; - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - public boolean hasDataExchange() { - return dataExchangeBuilder_ != null || dataExchange_ != null; - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange() { - if (dataExchangeBuilder_ == null) { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } else { - return dataExchangeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataExchange(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataExchange_ = value; - onChanged(); - } else { - dataExchangeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataExchange( - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder builderForValue) { - if (dataExchangeBuilder_ == null) { - dataExchange_ = builderForValue.build(); - onChanged(); - } else { - dataExchangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDataExchange(com.google.cloud.bigquery.analyticshub.v1.DataExchange value) { - if (dataExchangeBuilder_ == null) { - if (dataExchange_ != null) { - dataExchange_ = - com.google.cloud.bigquery.analyticshub.v1.DataExchange.newBuilder(dataExchange_) - .mergeFrom(value) - .buildPartial(); - } else { - dataExchange_ = value; - } - onChanged(); - } else { - dataExchangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDataExchange() { - if (dataExchangeBuilder_ == null) { - dataExchange_ = null; - onChanged(); - } else { - dataExchange_ = null; - dataExchangeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder getDataExchangeBuilder() { - - onChanged(); - return getDataExchangeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder - getDataExchangeOrBuilder() { - if (dataExchangeBuilder_ != null) { - return dataExchangeBuilder_.getMessageOrBuilder(); - } else { - return dataExchange_ == null - ? com.google.cloud.bigquery.analyticshub.v1.DataExchange.getDefaultInstance() - : dataExchange_; - } - } - /** - * - * - *
-     * Required. The data exchange to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder> - getDataExchangeFieldBuilder() { - if (dataExchangeBuilder_ == null) { - dataExchangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.DataExchange, - com.google.cloud.bigquery.analyticshub.v1.DataExchange.Builder, - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder>( - getDataExchange(), getParentForChildren(), isClean()); - dataExchange_ = null; - } - return dataExchangeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.UpdateDataExchangeRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateDataExchangeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.UpdateDataExchangeRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequestOrBuilder.java deleted file mode 100644 index dcad677a109e..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateDataExchangeRequestOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface UpdateDataExchangeRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the data exchange
-   * resource. The fields specified in the
-   * `updateMask` are relative to the resource and are not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataExchange field is set. - */ - boolean hasDataExchange(); - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataExchange. - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchange getDataExchange(); - /** - * - * - *
-   * Required. The data exchange to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.DataExchangeOrBuilder getDataExchangeOrBuilder(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequest.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequest.java deleted file mode 100644 index e4463ec1769c..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequest.java +++ /dev/null @@ -1,1033 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -/** - * - * - *
- * Message for updating a Listing.
- * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.UpdateListingRequest} - */ -public final class UpdateListingRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) - UpdateListingRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateListingRequest.newBuilder() to construct. - private UpdateListingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateListingRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateListingRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int LISTING_FIELD_NUMBER = 2; - private com.google.cloud.bigquery.analyticshub.v1.Listing listing_; - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - @java.lang.Override - public boolean hasListing() { - return listing_ != null; - } - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.Listing getListing() { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder() { - return getListing(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (listing_ != null) { - output.writeMessage(2, getListing()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (listing_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getListing()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.bigquery.analyticshub.v1.UpdateListingRequest)) { - return super.equals(obj); - } - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest other = - (com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasListing() != other.hasListing()) return false; - if (hasListing()) { - if (!getListing().equals(other.getListing())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasListing()) { - hash = (37 * hash) + LISTING_FIELD_NUMBER; - hash = (53 * hash) + getListing().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest 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.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - 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.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - java.io.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.bigquery.analyticshub.v1.UpdateListingRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseDelimitedFrom( - java.io.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.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.bigquery.analyticshub.v1.UpdateListingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message for updating a Listing.
-   * 
- * - * Protobuf type {@code google.cloud.bigquery.analyticshub.v1.UpdateListingRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.class, - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.Builder.class); - } - - // Construct using com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - if (listingBuilder_ == null) { - listing_ = null; - } else { - listing_ = null; - listingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubProto - .internal_static_google_cloud_bigquery_analyticshub_v1_UpdateListingRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest - getDefaultInstanceForType() { - return com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest build() { - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest buildPartial() { - com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest result = - new com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest(this); - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - if (listingBuilder_ == null) { - result.listing_ = listing_; - } else { - result.listing_ = listingBuilder_.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.bigquery.analyticshub.v1.UpdateListingRequest) { - return mergeFrom((com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest other) { - if (other - == com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasListing()) { - mergeListing(other.getListing()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getListingFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - 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_; - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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(); - } - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Required. Field mask specifies the fields to update in the listing resource. The
-     * fields specified in the `updateMask` are relative to the resource and are
-     * not a full request.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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_; - } - - private com.google.cloud.bigquery.analyticshub.v1.Listing listing_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - listingBuilder_; - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - public boolean hasListing() { - return listingBuilder_ != null || listing_ != null; - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing getListing() { - if (listingBuilder_ == null) { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } else { - return listingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setListing(com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - listing_ = value; - onChanged(); - } else { - listingBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setListing( - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder builderForValue) { - if (listingBuilder_ == null) { - listing_ = builderForValue.build(); - onChanged(); - } else { - listingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeListing(com.google.cloud.bigquery.analyticshub.v1.Listing value) { - if (listingBuilder_ == null) { - if (listing_ != null) { - listing_ = - com.google.cloud.bigquery.analyticshub.v1.Listing.newBuilder(listing_) - .mergeFrom(value) - .buildPartial(); - } else { - listing_ = value; - } - onChanged(); - } else { - listingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearListing() { - if (listingBuilder_ == null) { - listing_ = null; - onChanged(); - } else { - listing_ = null; - listingBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.Listing.Builder getListingBuilder() { - - onChanged(); - return getListingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder() { - if (listingBuilder_ != null) { - return listingBuilder_.getMessageOrBuilder(); - } else { - return listing_ == null - ? com.google.cloud.bigquery.analyticshub.v1.Listing.getDefaultInstance() - : listing_; - } - } - /** - * - * - *
-     * Required. The listing to update.
-     * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder> - getListingFieldBuilder() { - if (listingBuilder_ == null) { - listingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.bigquery.analyticshub.v1.Listing, - com.google.cloud.bigquery.analyticshub.v1.Listing.Builder, - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder>( - getListing(), getParentForChildren(), isClean()); - listing_ = null; - } - return listingBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.bigquery.analyticshub.v1.UpdateListingRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) - private static final com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest(); - } - - public static com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateListingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.bigquery.analyticshub.v1.UpdateListingRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequestOrBuilder.java b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequestOrBuilder.java deleted file mode 100644 index 4b26e10684f2..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/java/com/google/cloud/bigquery/analyticshub/v1/UpdateListingRequestOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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/bigquery/analyticshub/v1/analyticshub.proto - -package com.google.cloud.bigquery.analyticshub.v1; - -public interface UpdateListingRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.analyticshub.v1.UpdateListingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required. Field mask specifies the fields to update in the listing resource. The
-   * fields specified in the `updateMask` are relative to the resource and are
-   * not a full request.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the listing field is set. - */ - boolean hasListing(); - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The listing. - */ - com.google.cloud.bigquery.analyticshub.v1.Listing getListing(); - /** - * - * - *
-   * Required. The listing to update.
-   * 
- * - * - * .google.cloud.bigquery.analyticshub.v1.Listing listing = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.bigquery.analyticshub.v1.ListingOrBuilder getListingOrBuilder(); -} diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/proto/google/cloud/bigquery/analyticshub/v1/analyticshub.proto b/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/proto/google/cloud/bigquery/analyticshub/v1/analyticshub.proto deleted file mode 100644 index 7adf65844432..000000000000 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/src/main/proto/google/cloud/bigquery/analyticshub/v1/analyticshub.proto +++ /dev/null @@ -1,651 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.analyticshub.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.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"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.AnalyticsHub.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/analyticshub/v1;analyticshub"; -option java_multiple_files = true; -option java_outer_classname = "AnalyticsHubProto"; -option java_package = "com.google.cloud.bigquery.analyticshub.v1"; -option php_namespace = "Google\\Cloud\\BigQuery\\AnalyticsHub\\V1"; -option ruby_package = "Google::Cloud::Bigquery::AnalyticsHub::V1"; -option (google.api.resource_definition) = { - type: "bigquery.googleapis.com/Dataset" - pattern: "projects/{project}/datasets/{dataset}" -}; - -// The `AnalyticsHubService` API facilitates data sharing within and across -// organizations. It allows data providers to publish listings that reference -// shared datasets. With Analytics Hub, users can discover and search for -// listings that they have access to. Subscribers can view and subscribe to -// listings. When you subscribe to a listing, Analytics Hub creates a linked -// dataset in your project. -service AnalyticsHubService { - option (google.api.default_host) = "analyticshub.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/bigquery," - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all data exchanges in a given project and location. - rpc ListDataExchanges(ListDataExchangesRequest) returns (ListDataExchangesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataExchanges" - }; - option (google.api.method_signature) = "parent"; - } - - // Lists all data exchanges from projects in a given organization and - // location. - rpc ListOrgDataExchanges(ListOrgDataExchangesRequest) returns (ListOrgDataExchangesResponse) { - option (google.api.http) = { - get: "/v1/{organization=organizations/*/locations/*}/dataExchanges" - }; - option (google.api.method_signature) = "organization"; - } - - // Gets the details of a data exchange. - rpc GetDataExchange(GetDataExchangeRequest) returns (DataExchange) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataExchanges/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new data exchange. - rpc CreateDataExchange(CreateDataExchangeRequest) returns (DataExchange) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataExchanges" - body: "data_exchange" - }; - option (google.api.method_signature) = "parent,data_exchange"; - } - - // Updates an existing data exchange. - rpc UpdateDataExchange(UpdateDataExchangeRequest) returns (DataExchange) { - option (google.api.http) = { - patch: "/v1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}" - body: "data_exchange" - }; - option (google.api.method_signature) = "data_exchange,update_mask"; - } - - // Deletes an existing data exchange. - rpc DeleteDataExchange(DeleteDataExchangeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataExchanges/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all listings in a given project and location. - rpc ListListings(ListListingsRequest) returns (ListListingsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a listing. - rpc GetListing(GetListingRequest) returns (Listing) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new listing. - rpc CreateListing(CreateListingRequest) returns (Listing) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/dataExchanges/*}/listings" - body: "listing" - }; - option (google.api.method_signature) = "parent,listing"; - } - - // Updates an existing listing. - rpc UpdateListing(UpdateListingRequest) returns (Listing) { - option (google.api.http) = { - patch: "/v1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}" - body: "listing" - }; - option (google.api.method_signature) = "listing,update_mask"; - } - - // Deletes a listing. - rpc DeleteListing(DeleteListingRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Subscribes to a listing. - // - // Currently, with Analytics Hub, you can create listings that - // reference only BigQuery datasets. - // Upon subscription to a listing for a BigQuery dataset, Analytics Hub - // creates a linked dataset in the subscriber's project. - rpc SubscribeListing(SubscribeListingRequest) returns (SubscribeListingResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the IAM policy. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy" - body: "*" - } - }; - } - - // Sets the IAM policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy" - body: "*" - } - }; - } - - // Returns the permissions that a caller has. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// A data exchange is a container that lets you share data. Along with the -// descriptive information about the data exchange, it contains listings that -// reference shared datasets. -message DataExchange { - option (google.api.resource) = { - type: "analyticshub.googleapis.com/DataExchange" - pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}" - }; - - // Output only. The resource name of the data exchange. - // e.g. `projects/myproject/locations/US/dataExchanges/123`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Human-readable display name of the data exchange. The display name must - // contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - // spaces ( ), ampersands (&) and must not start or end with spaces. - // Default value is an empty string. - // Max length: 63 bytes. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the data exchange. The description must not contain Unicode - // non-characters as well as C0 and C1 control codes except tabs (HT), - // new lines (LF), carriage returns (CR), and page breaks (FF). - // Default value is an empty string. - // Max length: 2000 bytes. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Email or URL of the primary point of contact of the data exchange. - // Max Length: 1000 bytes. - string primary_contact = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Documentation describing the data exchange. - string documentation = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Number of listings contained in the data exchange. - int32 listing_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - // Expected image dimensions are 512x512 pixels, however the API only - // performs validation on size of the encoded data. - // Note: For byte fields, the content of the fields are base64-encoded (which - // increases the size of the data by 33-36%) when using JSON on the wire. - bytes icon = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Contains details of the data provider. -message DataProvider { - // Optional. Name of the data provider. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Email or URL of the data provider. - // Max Length: 1000 bytes. - string primary_contact = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Contains details of the listing publisher. -message Publisher { - // Optional. Name of the listing publisher. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Email or URL of the listing publisher. - // Max Length: 1000 bytes. - string primary_contact = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Contains the reference that identifies a destination bigquery dataset. -message DestinationDatasetReference { - // Required. A unique ID for this dataset, without the project name. The ID - // must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - // The maximum length is 1,024 characters. - string dataset_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID of the project containing this dataset. - string project_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Defines the destination bigquery dataset. -message DestinationDataset { - // Required. A reference that identifies the destination dataset. - DestinationDatasetReference dataset_reference = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A descriptive name for the dataset. - google.protobuf.StringValue friendly_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A user-friendly description of the dataset. - google.protobuf.StringValue description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The labels associated with this dataset. You can use these - // to organize and group your datasets. - // You can set this property when inserting or updating a dataset. - // See https://cloud.google.com/resource-manager/docs/creating-managing-labels - // for more information. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The geographic location where the dataset should reside. See - // https://cloud.google.com/bigquery/docs/locations for supported - // locations. - string location = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// A listing is what gets published into a data exchange that a subscriber can -// subscribe to. It contains a reference to the data source along with -// descriptive information that will help subscribers find and subscribe the -// data. -message Listing { - option (google.api.resource) = { - type: "analyticshub.googleapis.com/Listing" - pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" - }; - - // A reference to a shared dataset. It is an existing BigQuery dataset with a - // collection of objects such as tables and views that you want to share - // with subscribers. - // When subscriber's subscribe to a listing, Analytics Hub creates a linked - // dataset in - // the subscriber's project. A Linked dataset is an opaque, read-only BigQuery - // dataset that serves as a _symbolic link_ to a shared dataset. - message BigQueryDatasetSource { - // Resource name of the dataset source for this listing. - // e.g. `projects/myproject/datasets/123` - string dataset = 1 [(google.api.resource_reference) = { - type: "bigquery.googleapis.com/Dataset" - }]; - } - - // State of the listing. - enum State { - // Default value. This value is unused. - STATE_UNSPECIFIED = 0; - - // Subscribable state. Users with dataexchange.listings.subscribe permission - // can subscribe to this listing. - ACTIVE = 1; - } - - // Listing categories. - enum Category { - CATEGORY_UNSPECIFIED = 0; - - CATEGORY_OTHERS = 1; - - CATEGORY_ADVERTISING_AND_MARKETING = 2; - - CATEGORY_COMMERCE = 3; - - CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; - - CATEGORY_DEMOGRAPHICS = 5; - - CATEGORY_ECONOMICS = 6; - - CATEGORY_EDUCATION = 7; - - CATEGORY_ENERGY = 8; - - CATEGORY_FINANCIAL = 9; - - CATEGORY_GAMING = 10; - - CATEGORY_GEOSPATIAL = 11; - - CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; - - CATEGORY_MEDIA = 13; - - CATEGORY_PUBLIC_SECTOR = 14; - - CATEGORY_RETAIL = 15; - - CATEGORY_SPORTS = 16; - - CATEGORY_SCIENCE_AND_RESEARCH = 17; - - CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; - - CATEGORY_TRAVEL_AND_TOURISM = 19; - } - - // Listing source. - oneof source { - // Required. Shared dataset i.e. BigQuery dataset source. - BigQueryDatasetSource bigquery_dataset = 6 [(google.api.field_behavior) = REQUIRED]; - } - - // Output only. The resource name of the listing. - // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Human-readable display name of the listing. The display name must contain - // only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - // ( ), ampersands (&) and can't start or end with spaces. - // Default value is an empty string. - // Max length: 63 bytes. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Short description of the listing. The description must not contain - // Unicode non-characters and C0 and C1 control codes except tabs (HT), - // new lines (LF), carriage returns (CR), and page breaks (FF). - // Default value is an empty string. - // Max length: 2000 bytes. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Email or URL of the primary point of contact of the listing. - // Max Length: 1000 bytes. - string primary_contact = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Documentation describing the listing. - string documentation = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the listing. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - // Expected image dimensions are 512x512 pixels, however the API only - // performs validation on size of the encoded data. - // Note: For byte fields, the contents of the field are base64-encoded (which - // increases the size of the data by 33-36%) when using JSON on the wire. - bytes icon = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Details of the data provider who owns the source data. - DataProvider data_provider = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Categories of the listing. Up to two categories are allowed. - repeated Category categories = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Details of the publisher who owns the listing and who can share - // the source data. - Publisher publisher = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Email or URL of the request access of the listing. - // Subscribers can use this reference to request access. - // Max Length: 1000 bytes. - string request_access = 12 [(google.api.field_behavior) = OPTIONAL]; -} - -// Message for requesting the list of data exchanges. -message ListDataExchangesRequest { - // Required. The parent resource path of the data exchanges. - // e.g. `projects/myproject/locations/US`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of results to return in a single response page. Leverage - // the page tokens to iterate through the entire collection. - int32 page_size = 2; - - // Page token, returned by a previous call, to request the next page of - // results. - string page_token = 3; -} - -// Message for response to the list of data exchanges. -message ListDataExchangesResponse { - // The list of data exchanges. - repeated DataExchange data_exchanges = 1; - - // A token to request the next page of results. - string next_page_token = 2; -} - -// Message for requesting the list of data exchanges from projects in an -// organization and location. -message ListOrgDataExchangesRequest { - // Required. The organization resource path of the projects containing DataExchanges. - // e.g. `organizations/myorg/locations/US`. - string organization = 1 [(google.api.field_behavior) = REQUIRED]; - - // The maximum number of results to return in a single response page. Leverage - // the page tokens to iterate through the entire collection. - int32 page_size = 2; - - // Page token, returned by a previous call, to request the next page of - // results. - string page_token = 3; -} - -// Message for response to listing data exchanges in an organization and -// location. -message ListOrgDataExchangesResponse { - // The list of data exchanges. - repeated DataExchange data_exchanges = 1; - - // A token to request the next page of results. - string next_page_token = 2; -} - -// Message for getting a data exchange. -message GetDataExchangeRequest { - // Required. The resource name of the data exchange. - // e.g. `projects/myproject/locations/US/dataExchanges/123`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/DataExchange" - } - ]; -} - -// Message for creating a data exchange. -message CreateDataExchangeRequest { - // Required. The parent resource path of the data exchange. - // e.g. `projects/myproject/locations/US`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The ID of the data exchange. - // Must contain only Unicode letters, numbers (0-9), underscores (_). - // Should not use characters that require URL-escaping, or characters - // outside of ASCII, spaces. - // Max length: 100 bytes. - string data_exchange_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The data exchange to create. - DataExchange data_exchange = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for updating a data exchange. -message UpdateDataExchangeRequest { - // Required. Field mask specifies the fields to update in the data exchange - // resource. The fields specified in the - // `updateMask` are relative to the resource and are not a full request. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The data exchange to update. - DataExchange data_exchange = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for deleting a data exchange. -message DeleteDataExchangeRequest { - // Required. The full name of the data exchange resource that you want to delete. - // For example, `projects/myproject/locations/US/dataExchanges/123`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/DataExchange" - } - ]; -} - -// Message for requesting the list of listings. -message ListListingsRequest { - // Required. The parent resource path of the listing. - // e.g. `projects/myproject/locations/US/dataExchanges/123`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/DataExchange" - } - ]; - - // The maximum number of results to return in a single response page. Leverage - // the page tokens to iterate through the entire collection. - int32 page_size = 2; - - // Page token, returned by a previous call, to request the next page of - // results. - string page_token = 3; -} - -// Message for response to the list of Listings. -message ListListingsResponse { - // The list of Listing. - repeated Listing listings = 1; - - // A token to request the next page of results. - string next_page_token = 2; -} - -// Message for getting a listing. -message GetListingRequest { - // Required. The resource name of the listing. - // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/Listing" - } - ]; -} - -// Message for creating a listing. -message CreateListingRequest { - // Required. The parent resource path of the listing. - // e.g. `projects/myproject/locations/US/dataExchanges/123`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/DataExchange" - } - ]; - - // Required. The ID of the listing to create. - // Must contain only Unicode letters, numbers (0-9), underscores (_). - // Should not use characters that require URL-escaping, or characters - // outside of ASCII, spaces. - // Max length: 100 bytes. - string listing_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The listing to create. - Listing listing = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for updating a Listing. -message UpdateListingRequest { - // Required. Field mask specifies the fields to update in the listing resource. The - // fields specified in the `updateMask` are relative to the resource and are - // not a full request. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The listing to update. - Listing listing = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for deleting a listing. -message DeleteListingRequest { - // Required. Resource name of the listing to delete. - // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/Listing" - } - ]; -} - -// Message for subscribing to a listing. -message SubscribeListingRequest { - // Resulting destination of the listing that you subscribed to. - oneof destination { - // BigQuery destination dataset to create for the subscriber. - DestinationDataset destination_dataset = 3; - } - - // Required. Resource name of the listing that you want to subscribe to. - // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticshub.googleapis.com/Listing" - } - ]; -} - -// Message for response when you subscribe to a listing. -message SubscribeListingResponse { - -} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Action.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Action.java index 892ec0120fe8..2f32f3846f47 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Action.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Action.java @@ -58,272 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Action( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - category_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - issue_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (detectTime_ != null) { - subBuilder = detectTime_.toBuilder(); - } - detectTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectTime_); - detectTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - lake_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - asset_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - dataLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - dataLocations_.add(s); - break; - } - case 82: - { - com.google.cloud.dataplex.v1.Action.InvalidDataFormat.Builder subBuilder = null; - if (detailsCase_ == 10) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.InvalidDataFormat) details_).toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.InvalidDataFormat.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.InvalidDataFormat) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 10; - break; - } - case 90: - { - com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.Builder subBuilder = null; - if (detailsCase_ == 11) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 11; - break; - } - case 98: - { - com.google.cloud.dataplex.v1.Action.InvalidDataPartition.Builder subBuilder = null; - if (detailsCase_ == 12) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.InvalidDataPartition) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.InvalidDataPartition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.InvalidDataPartition) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 12; - break; - } - case 106: - { - com.google.cloud.dataplex.v1.Action.MissingData.Builder subBuilder = null; - if (detailsCase_ == 13) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.MissingData) details_).toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.MissingData.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataplex.v1.Action.MissingData) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 13; - break; - } - case 114: - { - com.google.cloud.dataplex.v1.Action.MissingResource.Builder subBuilder = null; - if (detailsCase_ == 14) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.MissingResource) details_).toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.MissingResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.MissingResource) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 14; - break; - } - case 122: - { - com.google.cloud.dataplex.v1.Action.UnauthorizedResource.Builder subBuilder = null; - if (detailsCase_ == 15) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.UnauthorizedResource) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.UnauthorizedResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.UnauthorizedResource) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 15; - break; - } - case 170: - { - com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.Builder subBuilder = - null; - if (detailsCase_ == 21) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 21; - break; - } - case 178: - { - com.google.cloud.dataplex.v1.Action.InvalidDataOrganization.Builder subBuilder = null; - if (detailsCase_ == 22) { - subBuilder = - ((com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.Action.InvalidDataOrganization.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 22; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - dataLocations_ = dataLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_descriptor; @@ -554,45 +288,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MissingResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_MissingResource_descriptor; @@ -622,7 +317,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -631,7 +326,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -647,7 +342,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dataplex.v1.Action.MissingResource other = (com.google.cloud.dataplex.v1.Action.MissingResource) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -658,7 +353,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -790,17 +485,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.MissingResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -885,7 +573,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.MissingResource other) { if (other == com.google.cloud.dataplex.v1.Action.MissingResource.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -900,18 +588,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.MissingResource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.MissingResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -948,7 +649,19 @@ public MissingResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MissingResource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1005,45 +718,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UnauthorizedResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_UnauthorizedResource_descriptor; @@ -1073,7 +747,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1082,7 +756,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1098,7 +772,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dataplex.v1.Action.UnauthorizedResource other = (com.google.cloud.dataplex.v1.Action.UnauthorizedResource) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1109,7 +783,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1243,17 +917,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.UnauthorizedResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1338,7 +1005,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.UnauthorizedResource other) { if (other == com.google.cloud.dataplex.v1.Action.UnauthorizedResource.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1353,18 +1020,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.UnauthorizedResource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.UnauthorizedResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1401,7 +1081,19 @@ public UnauthorizedResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UnauthorizedResource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1489,52 +1181,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FailedSecurityPolicyApply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - asset_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_FailedSecurityPolicyApply_descriptor; @@ -1618,7 +1264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1630,7 +1276,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1647,7 +1293,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) obj; if (!getAsset().equals(other.getAsset())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1660,7 +1306,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ASSET_FIELD_NUMBER; hash = (53 * hash) + getAsset().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1795,17 +1441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1900,7 +1539,7 @@ public Builder mergeFrom( asset_ = other.asset_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1915,19 +1554,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + asset_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2077,7 +1734,19 @@ public FailedSecurityPolicyApply parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FailedSecurityPolicyApply(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2243,73 +1912,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InvalidDataFormat( - 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)) { - sampledDataLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sampledDataLocations_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - expectedFormat_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - newFormat_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sampledDataLocations_ = sampledDataLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_InvalidDataFormat_descriptor; @@ -2512,7 +2114,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newFormat_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, newFormat_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2535,7 +2137,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newFormat_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, newFormat_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2554,7 +2156,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSampledDataLocationsList().equals(other.getSampledDataLocationsList())) return false; if (!getExpectedFormat().equals(other.getExpectedFormat())) return false; if (!getNewFormat().equals(other.getNewFormat())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2573,7 +2175,7 @@ public int hashCode() { hash = (53 * hash) + getExpectedFormat().hashCode(); hash = (37 * hash) + NEW_FORMAT_FIELD_NUMBER; hash = (53 * hash) + getNewFormat().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2705,17 +2307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.InvalidDataFormat.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2832,7 +2427,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.InvalidDataFormat o newFormat_ = other.newFormat_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2847,18 +2442,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.InvalidDataFormat parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSampledDataLocationsIsMutable(); + sampledDataLocations_.add(s); + break; + } // case 10 + case 18: + { + expectedFormat_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + newFormat_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.InvalidDataFormat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3287,7 +2914,19 @@ public InvalidDataFormat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InvalidDataFormat(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3510,87 +3149,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IncompatibleDataSchema( - 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(); - - table_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - existingSchema_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - newSchema_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sampledDataLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sampledDataLocations_.add(s); - break; - } - case 40: - { - int rawValue = input.readEnum(); - - schemaChange_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sampledDataLocations_ = sampledDataLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_IncompatibleDataSchema_descriptor; @@ -4058,7 +3616,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(5, schemaChange_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4090,7 +3648,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, schemaChange_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4111,7 +3669,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNewSchema().equals(other.getNewSchema())) return false; if (!getSampledDataLocationsList().equals(other.getSampledDataLocationsList())) return false; if (schemaChange_ != other.schemaChange_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4134,7 +3692,7 @@ public int hashCode() { } hash = (37 * hash) + SCHEMA_CHANGE_FIELD_NUMBER; hash = (53 * hash) + schemaChange_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4266,17 +3824,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4408,7 +3959,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.IncompatibleDataSch if (other.schemaChange_ != 0) { setSchemaChangeValue(other.getSchemaChangeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4423,18 +3974,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + table_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + existingSchema_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + newSchema_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSampledDataLocationsIsMutable(); + sampledDataLocations_.add(s); + break; + } // case 34 + case 40: + { + schemaChange_ = input.readEnum(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5086,7 +4681,19 @@ public IncompatibleDataSchema parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IncompatibleDataSchema(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5174,52 +4781,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InvalidDataPartition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - expectedStructure_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_InvalidDataPartition_descriptor; @@ -5461,7 +5022,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, expectedStructure_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5476,7 +5037,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, expectedStructure_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5493,7 +5054,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Action.InvalidDataPartition) obj; if (expectedStructure_ != other.expectedStructure_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5506,7 +5067,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + EXPECTED_STRUCTURE_FIELD_NUMBER; hash = (53 * hash) + expectedStructure_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5638,17 +5199,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.InvalidDataPartition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5739,7 +5293,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.InvalidDataPartitio if (other.expectedStructure_ != 0) { setExpectedStructureValue(other.getExpectedStructureValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5754,18 +5308,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.InvalidDataPartition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expectedStructure_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.InvalidDataPartition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5909,7 +5482,19 @@ public InvalidDataPartition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InvalidDataPartition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5964,45 +5549,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MissingData( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_MissingData_descriptor; @@ -6032,7 +5578,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6041,7 +5587,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6057,7 +5603,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dataplex.v1.Action.MissingData other = (com.google.cloud.dataplex.v1.Action.MissingData) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6068,7 +5614,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6199,17 +5745,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.MissingData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6294,7 +5833,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.MissingData other) { if (other == com.google.cloud.dataplex.v1.Action.MissingData.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6309,18 +5848,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.MissingData parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.MissingData) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6357,7 +5909,19 @@ public MissingData parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MissingData(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6412,45 +5976,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InvalidDataOrganization( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Action_InvalidDataOrganization_descriptor; @@ -6480,7 +6005,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6489,7 +6014,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6505,7 +6030,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dataplex.v1.Action.InvalidDataOrganization other = (com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6516,7 +6041,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6648,17 +6173,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.InvalidDataOrganization.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6745,7 +6263,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Action.InvalidDataOrganiza if (other == com.google.cloud.dataplex.v1.Action.InvalidDataOrganization.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6760,19 +6278,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action.InvalidDataOrganization parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6810,7 +6340,19 @@ public InvalidDataOrganization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InvalidDataOrganization(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7826,7 +7368,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 22, (com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) details_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7905,7 +7447,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 22, (com.google.cloud.dataplex.v1.Action.InvalidDataOrganization) details_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7961,7 +7503,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8028,7 +7570,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8156,17 +7698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Action.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8192,6 +7727,30 @@ public Builder clear() { dataLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + if (invalidDataFormatBuilder_ != null) { + invalidDataFormatBuilder_.clear(); + } + if (incompatibleDataSchemaBuilder_ != null) { + incompatibleDataSchemaBuilder_.clear(); + } + if (invalidDataPartitionBuilder_ != null) { + invalidDataPartitionBuilder_.clear(); + } + if (missingDataBuilder_ != null) { + missingDataBuilder_.clear(); + } + if (missingResourceBuilder_ != null) { + missingResourceBuilder_.clear(); + } + if (unauthorizedResourceBuilder_ != null) { + unauthorizedResourceBuilder_.clear(); + } + if (failedSecurityPolicyApplyBuilder_ != null) { + failedSecurityPolicyApplyBuilder_.clear(); + } + if (invalidDataOrganizationBuilder_ != null) { + invalidDataOrganizationBuilder_.clear(); + } detailsCase_ = 0; details_ = null; return this; @@ -8425,7 +7984,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Action other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8440,17 +7999,134 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Action parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + category_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + issue_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + input.readMessage(getDetectTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + lake_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + asset_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataLocationsIsMutable(); + dataLocations_.add(s); + break; + } // case 74 + case 82: + { + input.readMessage( + getInvalidDataFormatFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getIncompatibleDataSchemaFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getInvalidDataPartitionFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(getMissingDataFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage(getMissingResourceFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + getUnauthorizedResourceFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 15; + break; + } // case 122 + case 170: + { + input.readMessage( + getFailedSecurityPolicyApplyFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + getInvalidDataOrganizationFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 22; + break; + } // case 178 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Action) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11381,7 +11057,18 @@ public Action parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Action(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Asset.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Asset.java index d4f5f6753d10..7ad8e72cf9ff 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Asset.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Asset.java @@ -57,207 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 802: - { - com.google.cloud.dataplex.v1.Asset.ResourceSpec.Builder subBuilder = null; - if (resourceSpec_ != null) { - subBuilder = resourceSpec_.toBuilder(); - } - resourceSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.ResourceSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceSpec_); - resourceSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 810: - { - com.google.cloud.dataplex.v1.Asset.ResourceStatus.Builder subBuilder = null; - if (resourceStatus_ != null) { - subBuilder = resourceStatus_.toBuilder(); - } - resourceStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.ResourceStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceStatus_); - resourceStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 826: - { - com.google.cloud.dataplex.v1.Asset.SecurityStatus.Builder subBuilder = null; - if (securityStatus_ != null) { - subBuilder = securityStatus_.toBuilder(); - } - securityStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.SecurityStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityStatus_); - securityStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 850: - { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.Builder subBuilder = null; - if (discoverySpec_ != null) { - subBuilder = discoverySpec_.toBuilder(); - } - discoverySpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(discoverySpec_); - discoverySpec_ = subBuilder.buildPartial(); - } - - break; - } - case 858: - { - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Builder subBuilder = null; - if (discoveryStatus_ != null) { - subBuilder = discoveryStatus_.toBuilder(); - } - discoveryStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(discoveryStatus_); - discoveryStatus_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_descriptor; @@ -412,74 +211,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 26: - { - 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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_SecurityStatus_descriptor; @@ -840,7 +571,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(3, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -860,7 +591,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -882,7 +613,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -901,7 +632,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1033,17 +764,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.SecurityStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1155,7 +879,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.SecurityStatus other if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1170,18 +894,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.SecurityStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.SecurityStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1607,7 +1362,19 @@ public SecurityStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1954,120 +1721,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiscoverySpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - enabled_ = input.readBool(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - includePatterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - includePatterns_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - excludePatterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - excludePatterns_.add(s); - break; - } - case 34: - { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.Builder subBuilder = - null; - if (csvOptions_ != null) { - subBuilder = csvOptions_.toBuilder(); - } - csvOptions_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(csvOptions_); - csvOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.Builder subBuilder = - null; - if (jsonOptions_ != null) { - subBuilder = jsonOptions_.toBuilder(); - } - jsonOptions_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jsonOptions_); - jsonOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - triggerCase_ = 10; - trigger_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - includePatterns_ = includePatterns_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - excludePatterns_ = excludePatterns_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_descriptor; @@ -2201,70 +1854,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CsvOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - headerRows_ = input.readInt32(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - delimiter_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - encoding_ = s; - break; - } - case 32: - { - disableTypeInference_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_CsvOptions_descriptor; @@ -2442,7 +2031,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableTypeInference_ != false) { output.writeBool(4, disableTypeInference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2463,7 +2052,7 @@ public int getSerializedSize() { if (disableTypeInference_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableTypeInference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2483,7 +2072,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDelimiter().equals(other.getDelimiter())) return false; if (!getEncoding().equals(other.getEncoding())) return false; if (getDisableTypeInference() != other.getDisableTypeInference()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2502,7 +2091,7 @@ public int hashCode() { hash = (53 * hash) + getEncoding().hashCode(); hash = (37 * hash) + DISABLE_TYPE_INFERENCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTypeInference()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2634,17 +2223,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2758,7 +2340,7 @@ public Builder mergeFrom( if (other.getDisableTypeInference() != false) { setDisableTypeInference(other.getDisableTypeInference()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2773,19 +2355,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + headerRows_ = input.readInt32(); + + break; + } // case 8 + case 18: + { + delimiter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + disableTypeInference_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3146,7 +2764,19 @@ public CsvOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CsvOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3245,58 +2875,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private JsonOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - encoding_ = s; - break; - } - case 16: - { - disableTypeInference_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_DiscoverySpec_JsonOptions_descriptor; @@ -3401,7 +2979,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableTypeInference_ != false) { output.writeBool(2, disableTypeInference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3416,7 +2994,7 @@ public int getSerializedSize() { if (disableTypeInference_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, disableTypeInference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3434,7 +3012,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEncoding().equals(other.getEncoding())) return false; if (getDisableTypeInference() != other.getDisableTypeInference()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3449,7 +3027,7 @@ public int hashCode() { hash = (53 * hash) + getEncoding().hashCode(); hash = (37 * hash) + DISABLE_TYPE_INFERENCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTypeInference()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3581,17 +3159,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3692,7 +3263,7 @@ public Builder mergeFrom( if (other.getDisableTypeInference() != false) { setDisableTypeInference(other.getDisableTypeInference()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3707,19 +3278,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + disableTypeInference_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3922,7 +3517,19 @@ public JsonOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4390,7 +3997,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (triggerCase_ == 10) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, trigger_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4427,7 +4034,7 @@ public int getSerializedSize() { if (triggerCase_ == 10) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, trigger_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4462,7 +4069,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4499,7 +4106,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4630,17 +4237,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.DiscoverySpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4813,7 +4413,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoverySpec other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4828,18 +4428,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.DiscoverySpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludePatternsIsMutable(); + includePatterns_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludePatternsIsMutable(); + excludePatterns_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getCsvOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getJsonOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + triggerCase_ = 10; + trigger_ = s; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.DiscoverySpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5960,7 +5612,19 @@ public DiscoverySpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiscoverySpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6079,59 +5743,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_ResourceSpec_descriptor; @@ -6424,7 +6035,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6440,7 +6051,7 @@ public int getSerializedSize() { != com.google.cloud.dataplex.v1.Asset.ResourceSpec.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6458,7 +6069,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6473,7 +6084,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6604,17 +6215,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.ResourceSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6712,7 +6316,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.ResourceSpec other) if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6727,18 +6331,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.ResourceSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.ResourceSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6999,7 +6628,19 @@ public ResourceSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7143,74 +6784,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 26: - { - 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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_ResourceStatus_descriptor; @@ -7543,7 +7116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(3, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7563,7 +7136,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7585,7 +7158,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7604,7 +7177,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7735,17 +7308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.ResourceStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7857,33 +7423,64 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.ResourceStatus other if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.ResourceStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.ResourceStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8304,7 +7901,19 @@ public ResourceStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8553,121 +8162,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiscoveryStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 26: - { - 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 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastRunTime_ != null) { - subBuilder = lastRunTime_.toBuilder(); - } - lastRunTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastRunTime_); - lastRunTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.Builder subBuilder = null; - if (stats_ != null) { - subBuilder = stats_.toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stats_); - stats_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (lastRunDuration_ != null) { - subBuilder = lastRunDuration_.toBuilder(); - } - lastRunDuration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastRunDuration_); - lastRunDuration_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_descriptor; @@ -8977,66 +8471,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Stats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - dataItems_ = input.readInt64(); - break; - } - case 16: - { - dataSize_ = input.readInt64(); - break; - } - case 24: - { - tables_ = input.readInt64(); - break; - } - case 32: - { - filesets_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Asset_DiscoveryStatus_Stats_descriptor; @@ -9150,7 +8584,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (filesets_ != 0L) { output.writeInt64(4, filesets_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9171,7 +8605,7 @@ public int getSerializedSize() { if (filesets_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, filesets_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9191,7 +8625,7 @@ public boolean equals(final java.lang.Object obj) { if (getDataSize() != other.getDataSize()) return false; if (getTables() != other.getTables()) return false; if (getFilesets() != other.getFilesets()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9210,7 +8644,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTables()); hash = (37 * hash) + FILESETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFilesets()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9342,17 +8776,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -9463,7 +8890,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stat if (other.getFilesets() != 0L) { setFilesets(other.getFilesets()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9478,18 +8905,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + dataItems_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + dataSize_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + tables_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + filesets_ = input.readInt64(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9735,7 +9199,19 @@ public Stats parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Stats(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10065,7 +9541,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (lastRunDuration_ != null) { output.writeMessage(7, getLastRunDuration()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10094,7 +9570,7 @@ public int getSerializedSize() { if (lastRunDuration_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastRunDuration()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10128,7 +9604,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLastRunDuration()) { if (!getLastRunDuration().equals(other.getLastRunDuration())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10159,7 +9635,7 @@ public int hashCode() { hash = (37 * hash) + LAST_RUN_DURATION_FIELD_NUMBER; hash = (53 * hash) + getLastRunDuration().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10290,17 +9766,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Asset.DiscoveryStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10454,7 +9923,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset.DiscoveryStatus othe if (other.hasLastRunDuration()) { mergeLastRunDuration(other.getLastRunDuration()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10469,18 +9938,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset.DiscoveryStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getLastRunTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage( + getLastRunDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Asset.DiscoveryStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11457,7 +10976,19 @@ public DiscoveryStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiscoveryStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12244,7 +11775,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (discoveryStatus_ != null) { output.writeMessage(107, getDiscoveryStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12299,7 +11830,7 @@ public int getSerializedSize() { if (discoveryStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(107, getDiscoveryStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12348,7 +11879,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDiscoveryStatus()) { if (!getDiscoveryStatus().equals(other.getDiscoveryStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12401,7 +11932,7 @@ public int hashCode() { hash = (37 * hash) + DISCOVERY_STATUS_FIELD_NUMBER; hash = (53 * hash) + getDiscoveryStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12550,17 +12081,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -12778,7 +12302,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Asset other) { if (other.hasDiscoveryStatus()) { mergeDiscoveryStatus(other.getDiscoveryStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12793,17 +12317,114 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Asset parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + + break; + } // case 64 + case 802: + { + input.readMessage(getResourceSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 802 + case 810: + { + input.readMessage(getResourceStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 810 + case 826: + { + input.readMessage(getSecurityStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 826 + case 850: + { + input.readMessage(getDiscoverySpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 850 + case 858: + { + input.readMessage(getDiscoveryStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 858 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Asset) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -14989,7 +14610,18 @@ public Asset parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/AssetStatus.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/AssetStatus.java index 0ad00f99795d..19f5558c14bb 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/AssetStatus.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/AssetStatus.java @@ -50,70 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AssetStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (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 16: - { - activeAssets_ = input.readInt32(); - break; - } - case 24: - { - securityPolicyApplyingAssets_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_AssetStatus_descriptor; @@ -235,7 +171,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (securityPolicyApplyingAssets_ != 0) { output.writeInt32(3, securityPolicyApplyingAssets_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +190,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, securityPolicyApplyingAssets_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -275,7 +211,7 @@ public boolean equals(final java.lang.Object obj) { } if (getActiveAssets() != other.getActiveAssets()) return false; if (getSecurityPolicyApplyingAssets() != other.getSecurityPolicyApplyingAssets()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -294,7 +230,7 @@ public int hashCode() { hash = (53 * hash) + getActiveAssets(); hash = (37 * hash) + SECURITY_POLICY_APPLYING_ASSETS_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyApplyingAssets(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -423,17 +359,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.AssetStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -541,7 +470,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.AssetStatus other) { if (other.getSecurityPolicyApplyingAssets() != 0) { setSecurityPolicyApplyingAssets(other.getSecurityPolicyApplyingAssets()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -556,17 +485,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.AssetStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + activeAssets_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + securityPolicyApplyingAssets_ = input.readInt32(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.AssetStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -892,7 +853,18 @@ public AssetStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AssetStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CancelJobRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CancelJobRequest.java index 6d6293fcb797..553832f94a51 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CancelJobRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CancelJobRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CancelJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CancelJobRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.CancelJobRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CancelJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CancelJobRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CancelJobRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CancelJobRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public CancelJobRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CancelJobRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Content.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Content.java index ab935252629e..d985662c446a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Content.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Content.java @@ -55,157 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Content( - 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(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - dataCase_ = 9; - data_ = s; - break; - } - case 802: - { - com.google.cloud.dataplex.v1.Content.SqlScript.Builder subBuilder = null; - if (contentCase_ == 100) { - subBuilder = - ((com.google.cloud.dataplex.v1.Content.SqlScript) content_).toBuilder(); - } - content_ = - input.readMessage( - com.google.cloud.dataplex.v1.Content.SqlScript.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataplex.v1.Content.SqlScript) content_); - content_ = subBuilder.buildPartial(); - } - contentCase_ = 100; - break; - } - case 810: - { - com.google.cloud.dataplex.v1.Content.Notebook.Builder subBuilder = null; - if (contentCase_ == 101) { - subBuilder = ((com.google.cloud.dataplex.v1.Content.Notebook) content_).toBuilder(); - } - content_ = - input.readMessage( - com.google.cloud.dataplex.v1.Content.Notebook.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataplex.v1.Content.Notebook) content_); - content_ = subBuilder.buildPartial(); - } - contentCase_ = 101; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Content_descriptor; @@ -300,52 +149,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SqlScript( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - engine_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Content_SqlScript_descriptor; @@ -557,7 +360,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, engine_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -571,7 +374,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, engine_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -588,7 +391,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Content.SqlScript) obj; if (engine_ != other.engine_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -601,7 +404,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENGINE_FIELD_NUMBER; hash = (53 * hash) + engine_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -732,17 +535,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Content.SqlScript.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -833,7 +629,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Content.SqlScript other) { if (other.engine_ != 0) { setEngineValue(other.getEngineValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -848,17 +644,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Content.SqlScript parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + engine_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Content.SqlScript) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -998,7 +814,19 @@ public SqlScript parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SqlScript(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1085,52 +913,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Notebook( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - kernelType_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Content_Notebook_descriptor; @@ -1342,7 +1124,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, kernelType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1356,7 +1138,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, kernelType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1373,7 +1155,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Content.Notebook) obj; if (kernelType_ != other.kernelType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1386,7 +1168,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KERNEL_TYPE_FIELD_NUMBER; hash = (53 * hash) + kernelType_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1517,17 +1299,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Content.Notebook.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1618,7 +1393,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Content.Notebook other) { if (other.kernelType_ != 0) { setKernelTypeValue(other.getKernelTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1633,17 +1408,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Content.Notebook parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + kernelType_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Content.Notebook) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1783,7 +1578,19 @@ public Notebook parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Notebook(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2512,7 +2319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (contentCase_ == 101) { output.writeMessage(101, (com.google.cloud.dataplex.v1.Content.Notebook) content_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2562,7 +2369,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 101, (com.google.cloud.dataplex.v1.Content.Notebook) content_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2609,7 +2416,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2660,7 +2467,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2808,17 +2615,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Content.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2845,6 +2645,12 @@ public Builder clear() { internalGetMutableLabels().clear(); description_ = ""; + if (sqlScriptBuilder_ != null) { + sqlScriptBuilder_.clear(); + } + if (notebookBuilder_ != null) { + notebookBuilder_.clear(); + } dataCase_ = 0; data_ = null; contentCase_ = 0; @@ -3012,7 +2818,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Content other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3027,17 +2833,97 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Content parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + path_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + dataCase_ = 9; + data_ = s; + break; + } // case 74 + case 802: + { + input.readMessage(getSqlScriptFieldBuilder().getBuilder(), extensionRegistry); + contentCase_ = 100; + break; + } // case 802 + case 810: + { + input.readMessage(getNotebookFieldBuilder().getBuilder(), extensionRegistry); + contentCase_ = 101; + break; + } // case 810 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Content) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4671,7 +4557,18 @@ public Content parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Content(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateAssetRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateAssetRequest.java index 7807784153fa..e0d2b024499d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateAssetRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateAssetRequest.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateAssetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - assetId_ = s; - break; - } - case 26: - { - com.google.cloud.dataplex.v1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = - input.readMessage(com.google.cloud.dataplex.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CreateAssetRequest_descriptor; @@ -353,7 +280,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +301,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -397,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAsset().equals(other.getAsset())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -418,7 +345,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -547,17 +474,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateAssetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -674,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateAssetRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -689,17 +609,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateAssetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + assetId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CreateAssetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1240,7 +1198,18 @@ public CreateAssetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateAssetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequest.java index a816fd907aa8..e943023f7d8d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequest.java @@ -52,73 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.dataplex.v1.Content.Builder subBuilder = null; - if (content_ != null) { - subBuilder = content_.toBuilder(); - } - content_ = - input.readMessage( - com.google.cloud.dataplex.v1.Content.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(content_); - content_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_CreateContentRequest_descriptor; @@ -280,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -298,7 +231,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getContent().equals(other.getContent())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +272,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -468,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -588,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateContentRequest other if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -603,18 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateContentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getContentFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.CreateContentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1029,7 +986,18 @@ public CreateContentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateContentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequest.java index 95925263fcda..dbd643fc02ee 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequest.java @@ -52,73 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateEntityRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 26: - { - com.google.cloud.dataplex.v1.Entity.Builder subBuilder = null; - if (entity_ != null) { - subBuilder = entity_.toBuilder(); - } - entity_ = - input.readMessage( - com.google.cloud.dataplex.v1.Entity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(entity_); - entity_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_CreateEntityRequest_descriptor; @@ -280,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -298,7 +231,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntity().equals(other.getEntity())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +272,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -468,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateEntityRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -588,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateEntityRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -603,17 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateEntityRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CreateEntityRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1015,7 +973,18 @@ public CreateEntityRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateEntityRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequest.java index 2edf1bc62e30..495d42997865 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequest.java @@ -53,80 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateEnvironmentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - environmentId_ = s; - break; - } - case 26: - { - com.google.cloud.dataplex.v1.Environment.Builder subBuilder = null; - if (environment_ != null) { - subBuilder = environment_.toBuilder(); - } - environment_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(environment_); - environment_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CreateEnvironmentRequest_descriptor; @@ -355,7 +281,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -376,7 +302,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -399,7 +325,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEnvironment().equals(other.getEnvironment())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -420,7 +346,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -550,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateEnvironmentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -677,7 +596,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateEnvironmentRequest o if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -692,18 +611,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateEnvironmentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + environmentId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getEnvironmentFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.CreateEnvironmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1250,7 +1206,18 @@ public CreateEnvironmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateEnvironmentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateLakeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateLakeRequest.java index 55812f305866..1663bd0bbce1 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateLakeRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateLakeRequest.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateLakeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - lakeId_ = s; - break; - } - case 26: - { - com.google.cloud.dataplex.v1.Lake.Builder subBuilder = null; - if (lake_ != null) { - subBuilder = lake_.toBuilder(); - } - lake_ = - input.readMessage(com.google.cloud.dataplex.v1.Lake.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lake_); - lake_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CreateLakeRequest_descriptor; @@ -352,7 +279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +300,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -396,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLake().equals(other.getLake())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -417,7 +344,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -546,17 +473,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateLakeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -672,7 +592,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateLakeRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -687,17 +607,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateLakeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + lakeId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getLakeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CreateLakeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1243,7 +1201,18 @@ public CreateLakeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateLakeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequest.java index b7a6c5b477bc..0fef5b9b48a0 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequest.java @@ -52,73 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreatePartitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 26: - { - com.google.cloud.dataplex.v1.Partition.Builder subBuilder = null; - if (partition_ != null) { - subBuilder = partition_.toBuilder(); - } - partition_ = - input.readMessage( - com.google.cloud.dataplex.v1.Partition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partition_); - partition_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_CreatePartitionRequest_descriptor; @@ -285,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +236,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +258,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPartition().equals(other.getPartition())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +277,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -473,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreatePartitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -593,7 +519,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreatePartitionRequest oth if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +534,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreatePartitionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.CreatePartitionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1034,7 +991,18 @@ public CreatePartitionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreatePartitionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateTaskRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateTaskRequest.java index a412712c63d5..24f07cc5f438 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateTaskRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateTaskRequest.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTaskRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - taskId_ = s; - break; - } - case 26: - { - com.google.cloud.dataplex.v1.Task.Builder subBuilder = null; - if (task_ != null) { - subBuilder = task_.toBuilder(); - } - task_ = - input.readMessage(com.google.cloud.dataplex.v1.Task.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(task_); - task_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CreateTaskRequest_descriptor; @@ -336,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -357,7 +284,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -380,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTask().equals(other.getTask())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +328,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateTaskRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -656,7 +576,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateTaskRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,17 +591,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateTaskRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + taskId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CreateTaskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1187,7 +1145,18 @@ public CreateTaskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTaskRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateZoneRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateZoneRequest.java index 8b4230df0938..0aa9e81922dd 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateZoneRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateZoneRequest.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateZoneRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - zoneId_ = s; - break; - } - case 26: - { - com.google.cloud.dataplex.v1.Zone.Builder subBuilder = null; - if (zone_ != null) { - subBuilder = zone_.toBuilder(); - } - zone_ = - input.readMessage(com.google.cloud.dataplex.v1.Zone.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zone_); - zone_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_CreateZoneRequest_descriptor; @@ -352,7 +279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +300,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -396,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZone().equals(other.getZone())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -417,7 +344,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -546,17 +473,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.CreateZoneRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -672,7 +592,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateZoneRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -687,17 +607,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.CreateZoneRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + zoneId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getZoneFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.CreateZoneRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1243,7 +1201,18 @@ public CreateZoneRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateZoneRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteAssetRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteAssetRequest.java index 3cf95009f31e..0a4e9df2bb52 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteAssetRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteAssetRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAssetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_DeleteAssetRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteAssetRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteAssetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteAssetRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteAssetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DeleteAssetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -638,7 +605,18 @@ public DeleteAssetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAssetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequest.java index a5df9ee8ef9d..80cfab9288f0 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_DeleteContentRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteContentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteContentRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteContentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DeleteContentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteContentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteContentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequest.java index d56cc48b6f54..929958ce0673 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteEntityRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_DeleteEntityRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteEntityRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteEntityRequest other) etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,17 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteEntityRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DeleteEntityRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -824,7 +790,18 @@ public DeleteEntityRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteEntityRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequest.java index e4ae0782b191..5c1b85a3c5d1 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteEnvironmentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_DeleteEnvironmentRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteEnvironmentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteEnvironmentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteEnvironmentRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteEnvironmentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DeleteEnvironmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public DeleteEnvironmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteEnvironmentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteLakeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteLakeRequest.java index 3fed2a9f710c..3ad8c8e5df4e 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteLakeRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteLakeRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteLakeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_DeleteLakeRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteLakeRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteLakeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteLakeRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteLakeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DeleteLakeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public DeleteLakeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteLakeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequest.java index 63b68747b5a1..70dccba14c30 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePartitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_DeletePartitionRequest_descriptor; @@ -257,7 +204,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -272,7 +219,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -305,7 +252,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,17 +381,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeletePartitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -541,7 +481,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeletePartitionRequest oth etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -556,18 +496,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeletePartitionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DeletePartitionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -860,7 +825,18 @@ public DeletePartitionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePartitionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteTaskRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteTaskRequest.java index 85af1a03aaf4..f9fd01824edc 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteTaskRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteTaskRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTaskRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_DeleteTaskRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteTaskRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteTaskRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteTaskRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteTaskRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DeleteTaskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public DeleteTaskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTaskRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteZoneRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteZoneRequest.java index 386ceebe7891..df12032ffe88 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteZoneRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteZoneRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteZoneRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_DeleteZoneRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DeleteZoneRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DeleteZoneRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteZoneRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DeleteZoneRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DeleteZoneRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public DeleteZoneRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteZoneRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DiscoveryEvent.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DiscoveryEvent.java index 2d738948ee59..81e96c577284 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DiscoveryEvent.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DiscoveryEvent.java @@ -57,168 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiscoveryEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - lakeId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - zoneId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - assetId_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataLocation_ = s; - break; - } - case 80: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 162: - { - com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.Builder subBuilder = null; - if (detailsCase_ == 20) { - subBuilder = - ((com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 20; - break; - } - case 170: - { - com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.Builder subBuilder = null; - if (detailsCase_ == 21) { - subBuilder = - ((com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 21; - break; - } - case 178: - { - com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.Builder subBuilder = - null; - if (detailsCase_ == 22) { - subBuilder = - ((com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 22; - break; - } - case 186: - { - com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.Builder subBuilder = null; - if (detailsCase_ == 23) { - subBuilder = - ((com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 23; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_DiscoveryEvent_descriptor; @@ -769,61 +607,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConfigDetails( - 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)) { - parameters_ = - com.google.protobuf.MapField.newMapField( - ParametersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry parameters__ = - input.readMessage( - ParametersDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - parameters_.getMutableMap().put(parameters__.getKey(), parameters__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_DiscoveryEvent_ConfigDetails_descriptor; @@ -979,7 +762,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -998,7 +781,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, parameters__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1015,7 +798,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) obj; if (!internalGetParameters().equals(other.internalGetParameters())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1030,7 +813,7 @@ public int hashCode() { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + internalGetParameters().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1182,17 +965,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1282,7 +1058,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetai if (other == com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.getDefaultInstance()) return this; internalGetMutableParameters().mergeFrom(other.internalGetParameters()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1297,18 +1073,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry parameters__ = + input.readMessage( + ParametersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParameters() + .getMutableMap() + .put(parameters__.getKey(), parameters__.getValue()); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1529,7 +1329,19 @@ public ConfigDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1640,59 +1452,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EntityDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - entity_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_DiscoveryEvent_EntityDetails_descriptor; @@ -1819,7 +1578,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1836,7 +1595,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1854,7 +1613,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntity().equals(other.getEntity())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1869,7 +1628,7 @@ public int hashCode() { hash = (53 * hash) + getEntity().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2001,17 +1760,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2109,7 +1861,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetai if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2124,18 +1876,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + entity_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2376,7 +2153,19 @@ public EntityDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2571,80 +2360,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartitionDetails( - 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(); - - partition_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - entity_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sampledDataLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sampledDataLocations_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sampledDataLocations_ = sampledDataLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_DiscoveryEvent_PartitionDetails_descriptor; @@ -2894,7 +2609,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 4, sampledDataLocations_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2922,7 +2637,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSampledDataLocationsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2942,7 +2657,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntity().equals(other.getEntity())) return false; if (type_ != other.type_) return false; if (!getSampledDataLocationsList().equals(other.getSampledDataLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2963,7 +2678,7 @@ public int hashCode() { hash = (37 * hash) + SAMPLED_DATA_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getSampledDataLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3095,17 +2810,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3230,7 +2938,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDe } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3245,19 +2953,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + partition_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + entity_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSampledDataLocationsIsMutable(); + sampledDataLocations_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3791,7 +3536,19 @@ public PartitionDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3877,52 +3634,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ActionDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_DiscoveryEvent_ActionDetails_descriptor; @@ -4006,7 +3717,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4018,7 +3729,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4035,7 +3746,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) obj; if (!getType().equals(other.getType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4048,7 +3759,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4180,17 +3891,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4282,7 +3986,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetai type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4297,18 +4001,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4456,7 +4179,19 @@ public ActionDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ActionDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5063,7 +4798,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (detailsCase_ == 23) { output.writeMessage(23, (com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) details_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5112,7 +4847,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) details_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5151,7 +4886,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5194,7 +4929,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5323,17 +5058,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.DiscoveryEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5351,6 +5079,18 @@ public Builder clear() { type_ = 0; + if (configBuilder_ != null) { + configBuilder_.clear(); + } + if (entityBuilder_ != null) { + entityBuilder_.clear(); + } + if (partitionBuilder_ != null) { + partitionBuilder_.clear(); + } + if (actionBuilder_ != null) { + actionBuilder_.clear(); + } detailsCase_ = 0; details_ = null; return this; @@ -5513,7 +5253,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DiscoveryEvent other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5528,17 +5268,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.DiscoveryEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + lakeId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + zoneId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + assetId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + dataLocation_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 80: + { + type_ = input.readEnum(); + + break; + } // case 80 + case 162: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 23; + break; + } // case 186 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.DiscoveryEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7061,7 +6875,18 @@ public DiscoveryEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiscoveryEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Entity.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Entity.java index fcc1d623dbd9..d642986956ca 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Entity.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Entity.java @@ -62,201 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Entity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 42: - { - 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 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 80: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - asset_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataPath_ = s; - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataPathPattern_ = s; - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - - catalogEntry_ = s; - break; - } - case 120: - { - int rawValue = input.readEnum(); - - system_ = rawValue; - break; - } - case 130: - { - com.google.cloud.dataplex.v1.StorageFormat.Builder subBuilder = null; - if (format_ != null) { - subBuilder = format_.toBuilder(); - } - format_ = - input.readMessage( - com.google.cloud.dataplex.v1.StorageFormat.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(format_); - format_ = subBuilder.buildPartial(); - } - - break; - } - case 154: - { - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Builder subBuilder = null; - if (compatibility_ != null) { - subBuilder = compatibility_.toBuilder(); - } - compatibility_ = - input.readMessage( - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(compatibility_); - compatibility_ = subBuilder.buildPartial(); - } - - break; - } - case 402: - { - com.google.cloud.dataplex.v1.Schema.Builder subBuilder = null; - if (schema_ != null) { - subBuilder = schema_.toBuilder(); - } - schema_ = - input.readMessage( - com.google.cloud.dataplex.v1.Schema.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schema_); - schema_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Entity_descriptor; @@ -550,83 +355,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompatibilityStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.dataplex.v1.Entity.CompatibilityStatus.Compatibility.Builder - subBuilder = null; - if (hiveMetastore_ != null) { - subBuilder = hiveMetastore_.toBuilder(); - } - hiveMetastore_ = - input.readMessage( - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hiveMetastore_); - hiveMetastore_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.Builder - subBuilder = null; - if (bigquery_ != null) { - subBuilder = bigquery_.toBuilder(); - } - bigquery_ = - input.readMessage( - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bigquery_); - bigquery_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Entity_CompatibilityStatus_descriptor; @@ -722,58 +450,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Compatibility( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - compatible_ = input.readBool(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - reason_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Entity_CompatibilityStatus_Compatibility_descriptor; @@ -880,7 +556,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reason_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -895,7 +571,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reason_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -914,7 +590,7 @@ public boolean equals(final java.lang.Object obj) { if (getCompatible() != other.getCompatible()) return false; if (!getReason().equals(other.getReason())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -929,7 +605,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCompatible()); hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + getReason().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1065,17 +741,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1181,7 +850,7 @@ public Builder mergeFrom( reason_ = other.reason_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1196,20 +865,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + compatible_ = input.readBool(); + + break; + } // case 8 + case 18: + { + reason_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1415,7 +1107,19 @@ public Compatibility parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Compatibility(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1568,7 +1272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (bigquery_ != null) { output.writeMessage(2, getBigquery()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1583,7 +1287,7 @@ public int getSerializedSize() { if (bigquery_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBigquery()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1607,7 +1311,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBigquery()) { if (!getBigquery().equals(other.getBigquery())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1626,7 +1330,7 @@ public int hashCode() { hash = (37 * hash) + BIGQUERY_FIELD_NUMBER; hash = (53 * hash) + getBigquery().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1758,17 +1462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Entity.CompatibilityStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1881,7 +1578,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Entity.CompatibilityStatus if (other.hasBigquery()) { mergeBigquery(other.getBigquery()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1896,18 +1593,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Entity.CompatibilityStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getHiveMetastoreFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getBigqueryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Entity.CompatibilityStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2369,7 +2091,19 @@ public CompatibilityStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompatibilityStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3279,7 +3013,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (schema_ != null) { output.writeMessage(50, getSchema()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3337,7 +3071,7 @@ public int getSerializedSize() { if (schema_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50, getSchema()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3383,7 +3117,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSchema()) { if (!getSchema().equals(other.getSchema())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3436,7 +3170,7 @@ public int hashCode() { hash = (37 * hash) + SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getSchema().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3564,17 +3298,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Entity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3800,7 +3527,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Entity other) { if (other.hasSchema()) { mergeSchema(other.getSchema()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3815,17 +3542,127 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Entity parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 80: + { + type_ = input.readEnum(); + + break; + } // case 80 + case 90: + { + asset_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + dataPath_ = input.readStringRequireUtf8(); + + break; + } // case 98 + case 106: + { + dataPathPattern_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 114: + { + catalogEntry_ = input.readStringRequireUtf8(); + + break; + } // case 114 + case 120: + { + system_ = input.readEnum(); + + break; + } // case 120 + case 130: + { + input.readMessage(getFormatFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 130 + case 154: + { + input.readMessage(getCompatibilityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 154 + case 402: + { + input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 402 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Entity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6151,7 +5988,18 @@ public Entity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Entity(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Environment.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Environment.java index 183a11640c44..9fc2bbea6013 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Environment.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Environment.java @@ -57,192 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Environment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 802: - { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.Builder subBuilder = null; - if (infrastructureSpec_ != null) { - subBuilder = infrastructureSpec_.toBuilder(); - } - infrastructureSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infrastructureSpec_); - infrastructureSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 810: - { - com.google.cloud.dataplex.v1.Environment.SessionSpec.Builder subBuilder = null; - if (sessionSpec_ != null) { - subBuilder = sessionSpec_.toBuilder(); - } - sessionSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.SessionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sessionSpec_); - sessionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 818: - { - com.google.cloud.dataplex.v1.Environment.SessionStatus.Builder subBuilder = null; - if (sessionStatus_ != null) { - subBuilder = sessionStatus_.toBuilder(); - } - sessionStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.SessionStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sessionStatus_); - sessionStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 1602: - { - com.google.cloud.dataplex.v1.Environment.Endpoints.Builder subBuilder = null; - if (endpoints_ != null) { - subBuilder = endpoints_.toBuilder(); - } - endpoints_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.Endpoints.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpoints_); - endpoints_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_descriptor; @@ -395,94 +209,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InfrastructureSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 402: - { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.Builder - subBuilder = null; - if (resourcesCase_ == 50) { - subBuilder = - ((com.google.cloud.dataplex.v1.Environment.InfrastructureSpec - .ComputeResources) - resources_) - .toBuilder(); - } - resources_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources) - resources_); - resources_ = subBuilder.buildPartial(); - } - resourcesCase_ = 50; - break; - } - case 802: - { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.Builder - subBuilder = null; - if (runtimeCase_ == 100) { - subBuilder = - ((com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) - runtime_) - .toBuilder(); - } - runtime_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) - runtime_); - runtime_ = subBuilder.buildPartial(); - } - runtimeCase_ = 100; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_InfrastructureSpec_descriptor; @@ -576,61 +302,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ComputeResources( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - diskSizeGb_ = input.readInt32(); - break; - } - case 16: - { - nodeCount_ = input.readInt32(); - break; - } - case 24: - { - maxNodeCount_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_InfrastructureSpec_ComputeResources_descriptor; @@ -725,7 +396,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxNodeCount_ != 0) { output.writeInt32(3, maxNodeCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -743,7 +414,7 @@ public int getSerializedSize() { if (maxNodeCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxNodeCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -764,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (getDiskSizeGb() != other.getDiskSizeGb()) return false; if (getNodeCount() != other.getNodeCount()) return false; if (getMaxNodeCount() != other.getMaxNodeCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -781,7 +452,7 @@ public int hashCode() { hash = (53 * hash) + getNodeCount(); hash = (37 * hash) + MAX_NODE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getMaxNodeCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -925,17 +596,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1050,7 +714,7 @@ public Builder mergeFrom( if (other.getMaxNodeCount() != 0) { setMaxNodeCount(other.getMaxNodeCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1065,20 +729,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + diskSizeGb_ = input.readInt32(); + + break; + } // case 8 + case 16: + { + nodeCount_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + maxNodeCount_ = input.readInt32(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1278,7 +971,19 @@ public ComputeResources parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ComputeResources(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1561,95 +1266,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OsImageRuntime( - 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(); - - imageVersion_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - javaLibraries_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - javaLibraries_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pythonPackages_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pythonPackages_.add(s); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - javaLibraries_ = javaLibraries_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pythonPackages_ = pythonPackages_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_InfrastructureSpec_OsImageRuntime_descriptor; @@ -2006,7 +1622,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 4); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2044,7 +1660,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, properties__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2066,7 +1682,7 @@ public boolean equals(final java.lang.Object obj) { if (!getJavaLibrariesList().equals(other.getJavaLibrariesList())) return false; if (!getPythonPackagesList().equals(other.getPythonPackagesList())) return false; if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2091,7 +1707,7 @@ public int hashCode() { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + internalGetProperties().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2254,17 +1870,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2404,7 +2013,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2419,20 +2028,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + imageVersion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureJavaLibrariesIsMutable(); + javaLibraries_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePythonPackagesIsMutable(); + pythonPackages_.add(s); + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry properties__ = + input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProperties() + .getMutableMap() + .put(properties__.getKey(), properties__.getValue()); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3160,7 +2811,19 @@ public OsImageRuntime parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OsImageRuntime(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3418,7 +3081,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 100, (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) runtime_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3441,7 +3104,7 @@ public int getSerializedSize() { (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) runtime_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3473,7 +3136,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3500,7 +3163,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3632,22 +3295,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Environment.InfrastructureSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.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 (computeBuilder_ != null) { + computeBuilder_.clear(); + } + if (osImageBuilder_ != null) { + osImageBuilder_.clear(); + } resourcesCase_ = 0; resources_ = null; runtimeCase_ = 0; @@ -3771,7 +3433,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Environment.Infrastructure break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3786,19 +3448,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.InfrastructureSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 402: + { + input.readMessage(getComputeFieldBuilder().getBuilder(), extensionRegistry); + resourcesCase_ = 50; + break; + } // case 402 + case 802: + { + input.readMessage(getOsImageFieldBuilder().getBuilder(), extensionRegistry); + runtimeCase_ = 100; + break; + } // case 802 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.InfrastructureSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4361,7 +4047,19 @@ public InfrastructureSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InfrastructureSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4470,65 +4168,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SessionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (maxIdleDuration_ != null) { - subBuilder = maxIdleDuration_.toBuilder(); - } - maxIdleDuration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxIdleDuration_); - maxIdleDuration_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - enableFastStartup_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_SessionSpec_descriptor; @@ -4643,7 +4282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableFastStartup_ != false) { output.writeBool(2, enableFastStartup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4658,7 +4297,7 @@ public int getSerializedSize() { if (enableFastStartup_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableFastStartup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4679,7 +4318,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMaxIdleDuration().equals(other.getMaxIdleDuration())) return false; } if (getEnableFastStartup() != other.getEnableFastStartup()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4696,7 +4335,7 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_FAST_STARTUP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableFastStartup()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4820,17 +4459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Environment.SessionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4935,7 +4567,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Environment.SessionSpec ot if (other.getEnableFastStartup() != false) { setEnableFastStartup(other.getEnableFastStartup()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4950,18 +4582,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.SessionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getMaxIdleDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + enableFastStartup_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.SessionSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5274,7 +4932,19 @@ public SessionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SessionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5336,50 +5006,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SessionStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - active_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_SessionStatus_descriptor; @@ -5431,7 +5057,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (active_ != false) { output.writeBool(1, active_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5443,7 +5069,7 @@ public int getSerializedSize() { if (active_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, active_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5460,7 +5086,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Environment.SessionStatus) obj; if (getActive() != other.getActive()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5473,7 +5099,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ACTIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getActive()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5597,17 +5223,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Environment.SessionStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5698,7 +5317,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Environment.SessionStatus if (other.getActive() != false) { setActive(other.getActive()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5713,18 +5332,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.SessionStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + active_ = input.readBool(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.SessionStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5816,7 +5454,19 @@ public SessionStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SessionStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5917,59 +5567,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Endpoints( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - notebooks_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - sql_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Environment_Endpoints_descriptor; @@ -6103,7 +5700,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sql_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6118,7 +5715,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sql_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6136,7 +5733,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNotebooks().equals(other.getNotebooks())) return false; if (!getSql().equals(other.getSql())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6151,7 +5748,7 @@ public int hashCode() { hash = (53 * hash) + getNotebooks().hashCode(); hash = (37 * hash) + SQL_FIELD_NUMBER; hash = (53 * hash) + getSql().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6274,17 +5871,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Environment.Endpoints.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6383,7 +5973,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Environment.Endpoints othe sql_ = other.sql_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6398,18 +5988,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment.Endpoints parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + notebooks_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + sql_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Environment.Endpoints) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6658,7 +6273,19 @@ public Endpoints parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Endpoints(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7381,7 +7008,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endpoints_ != null) { output.writeMessage(200, getEndpoints()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7434,7 +7061,7 @@ public int getSerializedSize() { if (endpoints_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(200, getEndpoints()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7479,7 +7106,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndpoints()) { if (!getEndpoints().equals(other.getEndpoints())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7528,7 +7155,7 @@ public int hashCode() { hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getEndpoints().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7678,17 +7305,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Environment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7893,7 +7513,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Environment other) { if (other.hasEndpoints()) { mergeEndpoints(other.getEndpoints()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7908,17 +7528,109 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Environment parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + + break; + } // case 64 + case 802: + { + input.readMessage( + getInfrastructureSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 802 + case 810: + { + input.readMessage(getSessionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 810 + case 818: + { + input.readMessage(getSessionStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 818 + case 1602: + { + input.readMessage(getEndpointsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1602 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Environment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9880,7 +9592,18 @@ public Environment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Environment(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetAssetRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetAssetRequest.java index 8406d840e36d..74b29f807193 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetAssetRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetAssetRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAssetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetAssetRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetAssetRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetAssetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetAssetRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetAssetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetAssetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetAssetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAssetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequest.java index f623dce4c98b..faf89d727515 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - view_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_GetContentRequest_descriptor; @@ -400,7 +347,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +364,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +382,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +397,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VIEW_FIELD_NUMBER; hash = (53 * hash) + view_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -684,7 +624,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetContentRequest other) { if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -699,17 +639,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetContentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetContentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -969,7 +935,18 @@ public GetContentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetContentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEntityRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEntityRequest.java index a6dc6a354417..51740dd8e9fb 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEntityRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEntityRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetEntityRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - view_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_GetEntityRequest_descriptor; @@ -421,7 +368,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -438,7 +385,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +403,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +418,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VIEW_FIELD_NUMBER; hash = (53 * hash) + view_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +547,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetEntityRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -705,7 +645,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetEntityRequest other) { if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,17 +660,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetEntityRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetEntityRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,7 +961,18 @@ public GetEntityRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetEntityRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequest.java index c619407c167d..89c94759ba06 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetEnvironmentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetEnvironmentRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetEnvironmentRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetEnvironmentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetEnvironmentRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetEnvironmentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.GetEnvironmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public GetEnvironmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetEnvironmentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetJobRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetJobRequest.java index 53f5e68412d8..6cd21a8b5dd0 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetJobRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetJobRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetJobRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetJobRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetJobRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetJobRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetJobRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetJobRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetJobRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetLakeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetLakeRequest.java index cfe0ae0b801f..adcf1694ae8a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetLakeRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetLakeRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetLakeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetLakeRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetLakeRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetLakeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetLakeRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetLakeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetLakeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetLakeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetLakeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetPartitionRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetPartitionRequest.java index 2c2c085cce04..fa57c5d5e5ed 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetPartitionRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetPartitionRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPartitionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_GetPartitionRequest_descriptor; @@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +155,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetPartitionRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetPartitionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetPartitionRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetPartitionRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetPartitionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -652,7 +619,18 @@ public GetPartitionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPartitionRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetTaskRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetTaskRequest.java index dd0aed2a9ffb..aac5f0c26926 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetTaskRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetTaskRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTaskRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetTaskRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetTaskRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetTaskRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetTaskRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetTaskRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetTaskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetTaskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTaskRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetZoneRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetZoneRequest.java index cc8de5e0ef4e..a06280a89ce9 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetZoneRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetZoneRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetZoneRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_GetZoneRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.GetZoneRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.GetZoneRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.GetZoneRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.GetZoneRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.GetZoneRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetZoneRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetZoneRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java index 704c2a25e42a..e85083aa72ef 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java @@ -57,122 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Job( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - uid_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 48: - { - retryCount_ = input.readUInt32(); - break; - } - case 56: - { - int rawValue = input.readEnum(); - - service_ = rawValue; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceJob_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Job_descriptor; @@ -991,7 +875,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1027,7 +911,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1057,7 +941,7 @@ public boolean equals(final java.lang.Object obj) { if (service_ != other.service_) return false; if (!getServiceJob().equals(other.getServiceJob())) return false; if (!getMessage().equals(other.getMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1090,7 +974,7 @@ public int hashCode() { hash = (53 * hash) + getServiceJob().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1218,17 +1102,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Job.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1383,7 +1260,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Job other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1398,17 +1275,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Job parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + + break; + } // case 40 + case 48: + { + retryCount_ = input.readUInt32(); + + break; + } // case 48 + case 56: + { + service_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + serviceJob_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Job) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2516,7 +2461,18 @@ public Job parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Job(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java index 80694010e4de..494bd91c29fd 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java @@ -58,122 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private JobEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 48: - { - retries_ = input.readInt32(); - break; - } - case 56: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - service_ = rawValue; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceJob_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_JobEvent_descriptor; @@ -1088,7 +972,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceJob_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceJob_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1124,7 +1008,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceJob_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceJob_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1154,7 +1038,7 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (service_ != other.service_) return false; if (!getServiceJob().equals(other.getServiceJob())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1187,7 +1071,7 @@ public int hashCode() { hash = (53 * hash) + service_; hash = (37 * hash) + SERVICE_JOB_FIELD_NUMBER; hash = (53 * hash) + getServiceJob().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1316,17 +1200,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.JobEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1481,7 +1358,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.JobEvent other) { serviceJob_ = other.serviceJob_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1496,17 +1373,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.JobEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + jobId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + + break; + } // case 40 + case 48: + { + retries_ = input.readInt32(); + + break; + } // case 48 + case 56: + { + type_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + service_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + serviceJob_ = input.readStringRequireUtf8(); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.JobEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2543,7 +2488,18 @@ public JobEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JobEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Lake.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Lake.java index 75e9c3faad8d..a4d2a75a8b28 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Lake.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Lake.java @@ -64,180 +64,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Lake( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 818: - { - com.google.cloud.dataplex.v1.Lake.Metastore.Builder subBuilder = null; - if (metastore_ != null) { - subBuilder = metastore_.toBuilder(); - } - metastore_ = - input.readMessage( - com.google.cloud.dataplex.v1.Lake.Metastore.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metastore_); - metastore_ = subBuilder.buildPartial(); - } - - break; - } - case 826: - { - com.google.cloud.dataplex.v1.AssetStatus.Builder subBuilder = null; - if (assetStatus_ != null) { - subBuilder = assetStatus_.toBuilder(); - } - assetStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.AssetStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(assetStatus_); - assetStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 834: - { - com.google.cloud.dataplex.v1.Lake.MetastoreStatus.Builder subBuilder = null; - if (metastoreStatus_ != null) { - subBuilder = metastoreStatus_.toBuilder(); - } - metastoreStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Lake.MetastoreStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metastoreStatus_); - metastoreStatus_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Lake_descriptor; @@ -334,52 +160,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Metastore( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - service_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Lake_Metastore_descriptor; @@ -467,7 +247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -479,7 +259,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -496,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Lake.Metastore) obj; if (!getService().equals(other.getService())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -509,7 +289,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -640,17 +420,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Lake.Metastore.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -741,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Lake.Metastore other) { service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -756,17 +529,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Lake.Metastore parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Lake.Metastore) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -924,7 +717,19 @@ public Metastore parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Metastore(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1094,81 +899,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MetastoreStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 26: - { - 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 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - endpoint_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Lake_MetastoreStatus_descriptor; @@ -1597,7 +1327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpoint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1620,7 +1350,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpoint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1643,7 +1373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1664,7 +1394,7 @@ public int hashCode() { } hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getEndpoint().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1795,17 +1525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Lake.MetastoreStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1924,7 +1647,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Lake.MetastoreStatus other endpoint_ = other.endpoint_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1939,18 +1662,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Lake.MetastoreStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + endpoint_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Lake.MetastoreStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2477,7 +2237,19 @@ public MetastoreStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MetastoreStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3198,7 +2970,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (metastoreStatus_ != null) { output.writeMessage(104, getMetastoreStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3250,7 +3022,7 @@ public int getSerializedSize() { if (metastoreStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(104, getMetastoreStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3292,7 +3064,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMetastoreStatus()) { if (!getMetastoreStatus().equals(other.getMetastoreStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3339,7 +3111,7 @@ public int hashCode() { hash = (37 * hash) + METASTORE_STATUS_FIELD_NUMBER; hash = (53 * hash) + getMetastoreStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3494,17 +3266,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Lake.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3701,7 +3466,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Lake other) { if (other.hasMetastoreStatus()) { mergeMetastoreStatus(other.getMetastoreStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3716,17 +3481,108 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Lake parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 818: + { + input.readMessage(getMetastoreFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 818 + case 826: + { + input.readMessage(getAssetStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 826 + case 834: + { + input.readMessage(getMetastoreStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 834 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Lake) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5597,7 +5453,18 @@ public Lake parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Lake(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListActionsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListActionsResponse.java index c0294c4aeb3c..e296e4e2196b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListActionsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListActionsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListActionsResponse( - 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)) { - actions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - actions_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Action.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListActionsResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getActionsList().equals(other.getActionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListActionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getActionsFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + actions_ = null; actionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListActionsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,17 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListActionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Action m = + input.readMessage( + com.google.cloud.dataplex.v1.Action.parser(), extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListActionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1115,7 +1079,18 @@ public ListActionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListActionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetActionsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetActionsRequest.java index b213cf760df9..33a441d8ee4e 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetActionsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetActionsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetActionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListAssetActionsRequest_descriptor; @@ -279,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +239,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +258,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +275,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListAssetActionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -575,7 +510,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListAssetActionsRequest ot pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +525,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListAssetActionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListAssetActionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +903,18 @@ public ListAssetActionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetActionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsRequest.java index e06dc924d7c6..bdbf3d67c891 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListAssetsRequest_descriptor; @@ -399,7 +327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListAssetsRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListAssetsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListAssetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1293,7 +1258,18 @@ public ListAssetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsResponse.java index c7835e9ef9f9..68ff8c28f559 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListAssetsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssetsResponse( - 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)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Asset.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListAssetsResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAssetsList().equals(other.getAssetsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (assetsBuilder_ == null) { assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + assets_ = null; assetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListAssetsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,17 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListAssetsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Asset m = + input.readMessage( + com.google.cloud.dataplex.v1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListAssetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1115,7 +1079,18 @@ public ListAssetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequest.java index 8b54b74cd539..ad34841cb9fe 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_ListContentRequest_descriptor; @@ -351,7 +286,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -372,7 +307,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +327,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,7 +346,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -660,7 +588,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListContentRequest other) filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -675,17 +603,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListContentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListContentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1157,7 +1123,18 @@ public ListContentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListContentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponse.java index cb709d9ad3c8..fc033e5756b9 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListContentResponse( - 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)) { - content_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - content_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Content.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - content_ = java.util.Collections.unmodifiableList(content_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_ListContentResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getContentList().equals(other.getContentList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getContentFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (contentBuilder_ == null) { content_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + content_ = null; contentBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListContentResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,17 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListContentResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Content m = + input.readMessage( + com.google.cloud.dataplex.v1.Content.parser(), extensionRegistry); + if (contentBuilder_ == null) { + ensureContentIsMutable(); + content_.add(m); + } else { + contentBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListContentResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1115,7 +1079,18 @@ public ListContentResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListContentResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesRequest.java index 77240ec6bc7e..1cebef95e769 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListEntitiesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - int rawValue = input.readEnum(); - - view_ = rawValue; - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_ListEntitiesRequest_descriptor; @@ -565,7 +493,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -591,7 +519,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -612,7 +540,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -633,7 +561,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -762,17 +690,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListEntitiesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -888,7 +809,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListEntitiesRequest other) filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -903,17 +824,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListEntitiesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListEntitiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1488,7 +1453,18 @@ public ListEntitiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListEntitiesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesResponse.java index 4bb6d62df209..34376ec9f110 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEntitiesResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListEntitiesResponse( - 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)) { - entities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - entities_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Entity.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - entities_ = java.util.Collections.unmodifiableList(entities_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_ListEntitiesResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntitiesList().equals(other.getEntitiesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListEntitiesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEntitiesFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (entitiesBuilder_ == null) { entities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + entities_ = null; entitiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListEntitiesResponse other nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListEntitiesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Entity m = + input.readMessage( + com.google.cloud.dataplex.v1.Entity.parser(), extensionRegistry); + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(m); + } else { + entitiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListEntitiesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1116,7 +1079,18 @@ public ListEntitiesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListEntitiesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequest.java index 4bb367dfeca5..7ecfdc19ddc5 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListEnvironmentsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListEnvironmentsRequest_descriptor; @@ -399,7 +327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListEnvironmentsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -721,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListEnvironmentsRequest ot orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -736,18 +657,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListEnvironmentsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListEnvironmentsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1295,7 +1259,18 @@ public ListEnvironmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListEnvironmentsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponse.java index 399293bc4601..43c756582e82 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListEnvironmentsResponse( - 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)) { - environments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - environments_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Environment.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - environments_ = java.util.Collections.unmodifiableList(environments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListEnvironmentsResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEnvironmentsList().equals(other.getEnvironmentsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,19 +388,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListEnvironmentsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEnvironmentsFieldBuilder(); - } } @java.lang.Override @@ -469,10 +399,11 @@ public Builder clear() { super.clear(); if (environmentsBuilder_ == null) { environments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + environments_ = null; environmentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -594,7 +525,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListEnvironmentsResponse o nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -609,18 +540,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListEnvironmentsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Environment m = + input.readMessage( + com.google.cloud.dataplex.v1.Environment.parser(), extensionRegistry); + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(m); + } else { + environmentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListEnvironmentsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1120,7 +1083,18 @@ public ListEnvironmentsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListEnvironmentsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsRequest.java index 29632421cd28..065d3d375200 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListJobsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListJobsRequest_descriptor; @@ -279,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +239,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +258,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +275,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListJobsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -574,7 +509,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListJobsRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,17 +524,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListJobsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListJobsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -935,7 +902,18 @@ public ListJobsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsResponse.java index 605adcbcc16a..5e960e90bc89 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListJobsResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListJobsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - jobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - jobs_.add( - input.readMessage(com.google.cloud.dataplex.v1.Job.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListJobsResponse_descriptor; @@ -268,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -283,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getJobsList().equals(other.getJobsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListJobsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getJobsFieldBuilder(); - } } @java.lang.Override @@ -467,10 +398,11 @@ public Builder clear() { super.clear(); if (jobsBuilder_ == null) { jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + jobs_ = null; jobsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListJobsResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +538,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListJobsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Job m = + input.readMessage(com.google.cloud.dataplex.v1.Job.parser(), extensionRegistry); + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(m); + } else { + jobsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListJobsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1075,18 @@ public ListJobsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakeActionsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakeActionsRequest.java index f4f4cf64c023..457e38376712 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakeActionsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakeActionsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListLakeActionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListLakeActionsRequest_descriptor; @@ -279,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +239,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +258,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +275,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListLakeActionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -575,7 +510,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListLakeActionsRequest oth pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +525,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListLakeActionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListLakeActionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +903,18 @@ public ListLakeActionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLakeActionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesRequest.java index e5d90326678b..9a86b392297d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListLakesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListLakesRequest_descriptor; @@ -399,7 +327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListLakesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListLakesRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListLakesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListLakesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1293,7 +1258,18 @@ public ListLakesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLakesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesResponse.java index 1b54e888169f..4486efc2ab14 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListLakesResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListLakesResponse( - 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)) { - lakes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - lakes_.add( - input.readMessage(com.google.cloud.dataplex.v1.Lake.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachableLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachableLocations_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - lakes_ = java.util.Collections.unmodifiableList(lakes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachableLocations_ = unreachableLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListLakesResponse_descriptor; @@ -347,7 +274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, unreachableLocations_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +297,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableLocationsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +316,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLakesList().equals(other.getLakesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableLocationsList().equals(other.getUnreachableLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +337,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getUnreachableLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,19 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListLakesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLakesFieldBuilder(); - } } @java.lang.Override @@ -559,10 +477,11 @@ public Builder clear() { super.clear(); if (lakesBuilder_ == null) { lakes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + lakes_ = null; lakesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachableLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -700,7 +619,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListLakesResponse other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -715,17 +634,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListLakesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Lake m = + input.readMessage( + com.google.cloud.dataplex.v1.Lake.parser(), extensionRegistry); + if (lakesBuilder_ == null) { + ensureLakesIsMutable(); + lakes_.add(m); + } else { + lakesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListLakesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1388,7 +1347,18 @@ public ListLakesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLakesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsRequest.java index 306e596dba61..5bb99e2e739b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPartitionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_ListPartitionsRequest_descriptor; @@ -367,7 +302,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -388,7 +323,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -408,7 +343,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -427,7 +362,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -556,17 +491,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListPartitionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -676,7 +604,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListPartitionsRequest othe filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -691,18 +619,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListPartitionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListPartitionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1179,18 @@ public ListPartitionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPartitionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsResponse.java index e40e851ca7d7..99dcc3f1c4d5 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListPartitionsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPartitionsResponse( - 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)) { - partitions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - partitions_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Partition.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - partitions_ = java.util.Collections.unmodifiableList(partitions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_ListPartitionsResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPartitionsList().equals(other.getPartitionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListPartitionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPartitionsFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (partitionsBuilder_ == null) { partitions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + partitions_ = null; partitionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListPartitionsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListPartitionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Partition m = + input.readMessage( + com.google.cloud.dataplex.v1.Partition.parser(), extensionRegistry); + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.add(m); + } else { + partitionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListPartitionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1080,18 @@ public ListPartitionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPartitionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequest.java index ca975028b7c5..c39e491a2688 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSessionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListSessionsRequest_descriptor; @@ -353,7 +288,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +309,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +348,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +477,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListSessionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -662,7 +590,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListSessionsRequest other) filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -677,17 +605,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListSessionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListSessionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1164,7 +1130,18 @@ public ListSessionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSessionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponse.java index 307f2bbe3e78..e3f68b814d2a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSessionsResponse( - 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)) { - sessions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sessions_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Session.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sessions_ = java.util.Collections.unmodifiableList(sessions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListSessionsResponse_descriptor; @@ -269,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSessionsList().equals(other.getSessionsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListSessionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSessionsFieldBuilder(); - } } @java.lang.Override @@ -468,10 +398,11 @@ public Builder clear() { super.clear(); if (sessionsBuilder_ == null) { sessions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sessions_ = null; sessionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListSessionsResponse other nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListSessionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Session m = + input.readMessage( + com.google.cloud.dataplex.v1.Session.parser(), extensionRegistry); + if (sessionsBuilder_ == null) { + ensureSessionsIsMutable(); + sessions_.add(m); + } else { + sessionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListSessionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1116,7 +1079,18 @@ public ListSessionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSessionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksRequest.java index 4bb6bdbd8b43..084537427380 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTasksRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListTasksRequest_descriptor; @@ -397,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +349,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -463,7 +391,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListTasksRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -718,7 +639,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListTasksRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -733,17 +654,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListTasksRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListTasksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1286,7 +1251,18 @@ public ListTasksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTasksRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksResponse.java index 48644a759562..57bfe53822a7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListTasksResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTasksResponse( - 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)) { - tasks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - tasks_.add( - input.readMessage(com.google.cloud.dataplex.v1.Task.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachableLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachableLocations_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - tasks_ = java.util.Collections.unmodifiableList(tasks_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachableLocations_ = unreachableLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListTasksResponse_descriptor; @@ -347,7 +274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, unreachableLocations_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +297,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableLocationsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +316,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTasksList().equals(other.getTasksList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableLocationsList().equals(other.getUnreachableLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +337,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getUnreachableLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,19 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListTasksResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTasksFieldBuilder(); - } } @java.lang.Override @@ -559,10 +477,11 @@ public Builder clear() { super.clear(); if (tasksBuilder_ == null) { tasks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + tasks_ = null; tasksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachableLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -700,7 +619,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListTasksResponse other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -715,17 +634,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListTasksResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Task m = + input.readMessage( + com.google.cloud.dataplex.v1.Task.parser(), extensionRegistry); + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(m); + } else { + tasksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListTasksResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1388,7 +1347,18 @@ public ListTasksResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTasksResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZoneActionsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZoneActionsRequest.java index ba4cc76a776e..674cdcebc0b4 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZoneActionsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZoneActionsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListZoneActionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListZoneActionsRequest_descriptor; @@ -279,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +239,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +258,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +275,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListZoneActionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -575,7 +510,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListZoneActionsRequest oth pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +525,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListZoneActionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.ListZoneActionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +903,18 @@ public ListZoneActionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListZoneActionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesRequest.java index 14b509c3844f..84f644df42e9 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListZonesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListZonesRequest_descriptor; @@ -397,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +349,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -463,7 +391,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListZonesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -718,7 +639,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListZonesRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -733,17 +654,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListZonesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListZonesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1286,7 +1251,18 @@ public ListZonesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListZonesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesResponse.java index 3935a8d70e54..c08b3e79be41 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesResponse.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListZonesResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListZonesResponse( - 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)) { - zones_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - zones_.add( - input.readMessage(com.google.cloud.dataplex.v1.Zone.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - zones_ = java.util.Collections.unmodifiableList(zones_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_ListZonesResponse_descriptor; @@ -268,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -283,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZonesList().equals(other.getZonesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.ListZonesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getZonesFieldBuilder(); - } } @java.lang.Override @@ -467,10 +398,11 @@ public Builder clear() { super.clear(); if (zonesBuilder_ == null) { zones_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + zones_ = null; zonesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListZonesResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +538,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.ListZonesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dataplex.v1.Zone m = + input.readMessage( + com.google.cloud.dataplex.v1.Zone.parser(), extensionRegistry); + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(m); + } else { + zonesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.ListZonesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1076,18 @@ public ListZonesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListZonesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java index b7d66c196274..8022d16572e4 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java @@ -73,74 +73,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n#google/cloud/dataplex/v1/logs.proto\022\030g" - + "oogle.cloud.dataplex.v1\032\036google/protobuf" - + "/duration.proto\032\037google/protobuf/timesta" - + "mp.proto\"\240\t\n\016DiscoveryEvent\022\017\n\007message\030\001" - + " \001(\t\022\017\n\007lake_id\030\002 \001(\t\022\017\n\007zone_id\030\003 \001(\t\022\020" - + "\n\010asset_id\030\004 \001(\t\022\025\n\rdata_location\030\005 \001(\t\022" - + "@\n\004type\030\n \001(\01622.google.cloud.dataplex.v1" - + ".DiscoveryEvent.EventType\022H\n\006config\030\024 \001(" - + "\01326.google.cloud.dataplex.v1.DiscoveryEv" - + "ent.ConfigDetailsH\000\022H\n\006entity\030\025 \001(\01326.go" - + "ogle.cloud.dataplex.v1.DiscoveryEvent.En" - + "tityDetailsH\000\022N\n\tpartition\030\026 \001(\01329.googl" - + "e.cloud.dataplex.v1.DiscoveryEvent.Parti" - + "tionDetailsH\000\022H\n\006action\030\027 \001(\01326.google.c" - + "loud.dataplex.v1.DiscoveryEvent.ActionDe" - + "tailsH\000\032\236\001\n\rConfigDetails\022Z\n\nparameters\030" - + "\001 \003(\0132F.google.cloud.dataplex.v1.Discove" - + "ryEvent.ConfigDetails.ParametersEntry\0321\n" - + "\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\032b\n\rEntityDetails\022\016\n\006entity\030\001 \001(" - + "\t\022A\n\004type\030\002 \001(\01623.google.cloud.dataplex." - + "v1.DiscoveryEvent.EntityType\032\230\001\n\020Partiti" - + "onDetails\022\021\n\tpartition\030\001 \001(\t\022\016\n\006entity\030\002" - + " \001(\t\022A\n\004type\030\003 \001(\01623.google.cloud.datapl" - + "ex.v1.DiscoveryEvent.EntityType\022\036\n\026sampl" - + "ed_data_locations\030\004 \003(\t\032\035\n\rActionDetails" - + "\022\014\n\004type\030\001 \001(\t\"\264\001\n\tEventType\022\032\n\026EVENT_TY" - + "PE_UNSPECIFIED\020\000\022\n\n\006CONFIG\020\001\022\022\n\016ENTITY_C" - + "REATED\020\002\022\022\n\016ENTITY_UPDATED\020\003\022\022\n\016ENTITY_D" - + "ELETED\020\004\022\025\n\021PARTITION_CREATED\020\005\022\025\n\021PARTI" - + "TION_UPDATED\020\006\022\025\n\021PARTITION_DELETED\020\007\"A\n" - + "\nEntityType\022\033\n\027ENTITY_TYPE_UNSPECIFIED\020\000" - + "\022\t\n\005TABLE\020\001\022\013\n\007FILESET\020\002B\t\n\007details\"\234\004\n\010" - + "JobEvent\022\017\n\007message\030\001 \001(\t\022\016\n\006job_id\030\002 \001(" - + "\t\022.\n\nstart_time\030\003 \001(\0132\032.google.protobuf." - + "Timestamp\022,\n\010end_time\030\004 \001(\0132\032.google.pro" - + "tobuf.Timestamp\0227\n\005state\030\005 \001(\0162(.google." - + "cloud.dataplex.v1.JobEvent.State\022\017\n\007retr" - + "ies\030\006 \001(\005\0225\n\004type\030\007 \001(\0162\'.google.cloud.d" - + "ataplex.v1.JobEvent.Type\022;\n\007service\030\010 \001(" - + "\0162*.google.cloud.dataplex.v1.JobEvent.Se" - + "rvice\022\023\n\013service_job\030\t \001(\t\"5\n\004Type\022\024\n\020TY" - + "PE_UNSPECIFIED\020\000\022\t\n\005SPARK\020\001\022\014\n\010NOTEBOOK\020" - + "\002\"U\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tSUC" - + "CEEDED\020\001\022\n\n\006FAILED\020\002\022\r\n\tCANCELLED\020\003\022\013\n\007A" - + "BORTED\020\004\"0\n\007Service\022\027\n\023SERVICE_UNSPECIFI" - + "ED\020\000\022\014\n\010DATAPROC\020\001\"\302\004\n\014SessionEvent\022\017\n\007m" - + "essage\030\001 \001(\t\022\017\n\007user_id\030\002 \001(\t\022\022\n\nsession" - + "_id\030\003 \001(\t\022>\n\004type\030\004 \001(\01620.google.cloud.d" - + "ataplex.v1.SessionEvent.EventType\022C\n\005que" - + "ry\030\005 \001(\01322.google.cloud.dataplex.v1.Sess" - + "ionEvent.QueryDetailH\000\032\243\002\n\013QueryDetail\022\020" - + "\n\010query_id\030\001 \001(\t\022\022\n\nquery_text\030\002 \001(\t\022I\n\006" - + "engine\030\003 \001(\01629.google.cloud.dataplex.v1." - + "SessionEvent.QueryDetail.Engine\022+\n\010durat" - + "ion\030\004 \001(\0132\031.google.protobuf.Duration\022\031\n\021" - + "result_size_bytes\030\005 \001(\003\022\034\n\024data_processe" - + "d_bytes\030\006 \001(\003\"=\n\006Engine\022\026\n\022ENGINE_UNSPEC" - + "IFIED\020\000\022\r\n\tSPARK_SQL\020\001\022\014\n\010BIGQUERY\020\002\"G\n\t" - + "EventType\022\032\n\026EVENT_TYPE_UNSPECIFIED\020\000\022\t\n" - + "\005START\020\001\022\010\n\004STOP\020\002\022\t\n\005QUERY\020\003B\010\n\006detailB" - + "m\n\034com.google.cloud.dataplex.v1B\tLogsPro" - + "toP\001Z@google.golang.org/genproto/googlea" - + "pis/cloud/dataplex/v1;dataplexb\006proto3" + + "oogle.cloud.dataplex.v1\032\031google/api/reso" + + "urce.proto\032\036google/protobuf/duration.pro" + + "to\032\037google/protobuf/timestamp.proto\"\240\t\n\016" + + "DiscoveryEvent\022\017\n\007message\030\001 \001(\t\022\017\n\007lake_" + + "id\030\002 \001(\t\022\017\n\007zone_id\030\003 \001(\t\022\020\n\010asset_id\030\004 " + + "\001(\t\022\025\n\rdata_location\030\005 \001(\t\022@\n\004type\030\n \001(\016" + + "22.google.cloud.dataplex.v1.DiscoveryEve" + + "nt.EventType\022H\n\006config\030\024 \001(\01326.google.cl" + + "oud.dataplex.v1.DiscoveryEvent.ConfigDet" + + "ailsH\000\022H\n\006entity\030\025 \001(\01326.google.cloud.da" + + "taplex.v1.DiscoveryEvent.EntityDetailsH\000" + + "\022N\n\tpartition\030\026 \001(\01329.google.cloud.datap" + + "lex.v1.DiscoveryEvent.PartitionDetailsH\000" + + "\022H\n\006action\030\027 \001(\01326.google.cloud.dataplex" + + ".v1.DiscoveryEvent.ActionDetailsH\000\032\236\001\n\rC" + + "onfigDetails\022Z\n\nparameters\030\001 \003(\0132F.googl" + + "e.cloud.dataplex.v1.DiscoveryEvent.Confi" + + "gDetails.ParametersEntry\0321\n\017ParametersEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032b\n\rE" + + "ntityDetails\022\016\n\006entity\030\001 \001(\t\022A\n\004type\030\002 \001" + + "(\01623.google.cloud.dataplex.v1.DiscoveryE" + + "vent.EntityType\032\230\001\n\020PartitionDetails\022\021\n\t" + + "partition\030\001 \001(\t\022\016\n\006entity\030\002 \001(\t\022A\n\004type\030" + + "\003 \001(\01623.google.cloud.dataplex.v1.Discove" + + "ryEvent.EntityType\022\036\n\026sampled_data_locat" + + "ions\030\004 \003(\t\032\035\n\rActionDetails\022\014\n\004type\030\001 \001(" + + "\t\"\264\001\n\tEventType\022\032\n\026EVENT_TYPE_UNSPECIFIE" + + "D\020\000\022\n\n\006CONFIG\020\001\022\022\n\016ENTITY_CREATED\020\002\022\022\n\016E" + + "NTITY_UPDATED\020\003\022\022\n\016ENTITY_DELETED\020\004\022\025\n\021P" + + "ARTITION_CREATED\020\005\022\025\n\021PARTITION_UPDATED\020" + + "\006\022\025\n\021PARTITION_DELETED\020\007\"A\n\nEntityType\022\033" + + "\n\027ENTITY_TYPE_UNSPECIFIED\020\000\022\t\n\005TABLE\020\001\022\013" + + "\n\007FILESET\020\002B\t\n\007details\"\234\004\n\010JobEvent\022\017\n\007m" + + "essage\030\001 \001(\t\022\016\n\006job_id\030\002 \001(\t\022.\n\nstart_ti" + + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n\010" + + "end_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mp\0227\n\005state\030\005 \001(\0162(.google.cloud.dataple" + + "x.v1.JobEvent.State\022\017\n\007retries\030\006 \001(\005\0225\n\004" + + "type\030\007 \001(\0162\'.google.cloud.dataplex.v1.Jo" + + "bEvent.Type\022;\n\007service\030\010 \001(\0162*.google.cl" + + "oud.dataplex.v1.JobEvent.Service\022\023\n\013serv" + + "ice_job\030\t \001(\t\"5\n\004Type\022\024\n\020TYPE_UNSPECIFIE" + + "D\020\000\022\t\n\005SPARK\020\001\022\014\n\010NOTEBOOK\020\002\"U\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006F" + + "AILED\020\002\022\r\n\tCANCELLED\020\003\022\013\n\007ABORTED\020\004\"0\n\007S" + + "ervice\022\027\n\023SERVICE_UNSPECIFIED\020\000\022\014\n\010DATAP" + + "ROC\020\001\"\275\005\n\014SessionEvent\022\017\n\007message\030\001 \001(\t\022" + + "\017\n\007user_id\030\002 \001(\t\022\022\n\nsession_id\030\003 \001(\t\022>\n\004" + + "type\030\004 \001(\01620.google.cloud.dataplex.v1.Se" + + "ssionEvent.EventType\022C\n\005query\030\005 \001(\01322.go" + + "ogle.cloud.dataplex.v1.SessionEvent.Quer" + + "yDetailH\000\022\027\n\017event_succeeded\030\006 \001(\010\022\034\n\024fa" + + "st_startup_enabled\030\007 \001(\010\0226\n\023unassigned_d" + + "uration\030\010 \001(\0132\031.google.protobuf.Duration" + + "\032\243\002\n\013QueryDetail\022\020\n\010query_id\030\001 \001(\t\022\022\n\nqu" + + "ery_text\030\002 \001(\t\022I\n\006engine\030\003 \001(\01629.google." + + "cloud.dataplex.v1.SessionEvent.QueryDeta" + + "il.Engine\022+\n\010duration\030\004 \001(\0132\031.google.pro" + + "tobuf.Duration\022\031\n\021result_size_bytes\030\005 \001(" + + "\003\022\034\n\024data_processed_bytes\030\006 \001(\003\"=\n\006Engin" + + "e\022\026\n\022ENGINE_UNSPECIFIED\020\000\022\r\n\tSPARK_SQL\020\001" + + "\022\014\n\010BIGQUERY\020\002\"S\n\tEventType\022\032\n\026EVENT_TYP" + + "E_UNSPECIFIED\020\000\022\t\n\005START\020\001\022\010\n\004STOP\020\002\022\t\n\005" + + "QUERY\020\003\022\n\n\006CREATE\020\004B\010\n\006detailBm\n\034com.goo" + + "gle.cloud.dataplex.v1B\tLogsProtoP\001Z@goog" + + "le.golang.org/genproto/googleapis/cloud/" + + "dataplex/v1;dataplexb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -226,7 +231,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_SessionEvent_descriptor, new java.lang.String[] { - "Message", "UserId", "SessionId", "Type", "Query", "Detail", + "Message", + "UserId", + "SessionId", + "Type", + "Query", + "EventSucceeded", + "FastStartupEnabled", + "UnassignedDuration", + "Detail", }); internal_static_google_cloud_dataplex_v1_SessionEvent_QueryDetail_descriptor = internal_static_google_cloud_dataplex_v1_SessionEvent_descriptor.getNestedTypes().get(0); @@ -236,6 +249,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "QueryId", "QueryText", "Engine", "Duration", "ResultSizeBytes", "DataProcessedBytes", }); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/OperationMetadata.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/OperationMetadata.java index 3aa23dbaae86..eee11b33e09d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/OperationMetadata.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/OperationMetadata.java @@ -55,108 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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 (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 48: - { - requestedCancellation_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_OperationMetadata_descriptor; @@ -522,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -552,7 +450,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -581,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStatusMessage().equals(other.getStatusMessage())) return false; if (getRequestedCancellation() != other.getRequestedCancellation()) return false; if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -610,7 +508,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); hash = (37 * hash) + API_VERSION_FIELD_NUMBER; hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -739,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -893,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.OperationMetadata other) { apiVersion_ = other.apiVersion_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -908,17 +799,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.OperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1828,7 +1775,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Partition.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Partition.java index 59f8d0550f1e..af5d7dba912d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Partition.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Partition.java @@ -55,80 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Partition( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - values_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Partition_descriptor; @@ -416,7 +342,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -442,7 +368,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -461,7 +387,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValuesList().equals(other.getValuesList())) return false; if (!getLocation().equals(other.getLocation())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -482,7 +408,7 @@ public int hashCode() { hash = (53 * hash) + getLocation().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -611,17 +537,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Partition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -742,7 +661,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Partition other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -757,17 +676,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Partition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 18 + case 26: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Partition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1383,7 +1341,18 @@ public Partition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Partition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Schema.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Schema.java index 1dd2e87bbc57..4e41d66024ba 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Schema.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Schema.java @@ -54,89 +54,6 @@ 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 8: - { - userManaged_ = input.readBool(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partitionFields_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partitionFields_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Schema.PartitionField.parser(), - extensionRegistry)); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - partitionStyle_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partitionFields_ = java.util.Collections.unmodifiableList(partitionFields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_descriptor; @@ -1134,90 +1051,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SchemaField( - 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(); - - description_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage( - com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_descriptor; @@ -1525,7 +1358,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fields_.size(); i++) { output.writeMessage(10, fields_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1549,7 +1382,7 @@ public int getSerializedSize() { for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, fields_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1570,7 +1403,7 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (mode_ != other.mode_) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1593,7 +1426,7 @@ public int hashCode() { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1724,19 +1557,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Schema.SchemaField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } } @java.lang.Override @@ -1752,10 +1576,11 @@ public Builder clear() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fields_ = null; fieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1890,7 +1715,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema.SchemaField other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1905,18 +1730,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Schema.SchemaField parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 32: + { + mode_ = input.readEnum(); + + break; + } // case 32 + case 82: + { + com.google.cloud.dataplex.v1.Schema.SchemaField m = + input.readMessage( + com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), + extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Schema.SchemaField) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2773,7 +2649,19 @@ public SchemaField parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SchemaField(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2893,59 +2781,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartitionField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_descriptor; @@ -3074,7 +2909,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3089,7 +2924,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3107,7 +2942,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3122,7 +2957,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3256,17 +3091,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Schema.PartitionField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3364,7 +3192,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema.PartitionField othe if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3379,18 +3207,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Schema.PartitionField parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Schema.PartitionField) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3644,7 +3497,19 @@ public PartitionField parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionField(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3931,7 +3796,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, partitionStyle_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3954,7 +3819,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, partitionStyle_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3973,7 +3838,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFieldsList().equals(other.getFieldsList())) return false; if (!getPartitionFieldsList().equals(other.getPartitionFieldsList())) return false; if (partitionStyle_ != other.partitionStyle_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3996,7 +3861,7 @@ public int hashCode() { } hash = (37 * hash) + PARTITION_STYLE_FIELD_NUMBER; hash = (53 * hash) + partitionStyle_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4124,20 +3989,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Schema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - getPartitionFieldsFieldBuilder(); - } } @java.lang.Override @@ -4147,16 +4002,18 @@ public Builder clear() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fields_ = null; fieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (partitionFieldsBuilder_ == null) { partitionFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + partitionFields_ = null; partitionFieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); partitionStyle_ = 0; return this; @@ -4315,7 +4172,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema other) { if (other.partitionStyle_ != 0) { setPartitionStyleValue(other.getPartitionStyleValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4330,17 +4187,71 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Schema parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + userManaged_ = input.readBool(); + + break; + } // case 8 + case 18: + { + com.google.cloud.dataplex.v1.Schema.SchemaField m = + input.readMessage( + com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), + extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.dataplex.v1.Schema.PartitionField m = + input.readMessage( + com.google.cloud.dataplex.v1.Schema.PartitionField.parser(), + extensionRegistry); + if (partitionFieldsBuilder_ == null) { + ensurePartitionFieldsIsMutable(); + partitionFields_.add(m); + } else { + partitionFieldsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + partitionStyle_ = input.readEnum(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Schema) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5383,7 +5294,18 @@ public Schema parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Schema(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Session.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Session.java index c303c3e4e0fe..9dc490b2fd6d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Session.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Session.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Session( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - userId_ = s; - break; - } - case 26: - { - 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 32: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.AnalyzeProto .internal_static_google_cloud_dataplex_v1_Session_descriptor; @@ -348,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.cloud.dataplex.v1.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(4, state_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -369,7 +294,7 @@ public int getSerializedSize() { if (state_ != com.google.cloud.dataplex.v1.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +316,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (state_ != other.state_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +337,7 @@ public int hashCode() { } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,17 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Session.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -665,7 +583,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Session other) { if (other.state_ != 0) { setStateValue(other.getStateValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -680,17 +598,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Session parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + userId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Session) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1220,7 +1176,18 @@ public Session parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Session(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEvent.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEvent.java index 2e54430a0aa3..1c32d6fd3c7b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEvent.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEvent.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SessionEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - userId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - sessionId_ = s; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 42: - { - com.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Builder subBuilder = null; - if (detailCase_ == 5) { - subBuilder = - ((com.google.cloud.dataplex.v1.SessionEvent.QueryDetail) detail_).toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.dataplex.v1.SessionEvent.QueryDetail.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.SessionEvent.QueryDetail) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 5; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_SessionEvent_descriptor; @@ -181,7 +95,7 @@ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Event for start of a session.
+     * Event when the session is assigned to a user.
      * 
* * START = 1; @@ -207,6 +121,17 @@ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { * QUERY = 3; */ QUERY(3), + /** + * + * + *
+     * Event for creation of a cluster. It is not yet assigned to a user.
+     * This comes before START in the sequence
+     * 
+ * + * CREATE = 4; + */ + CREATE(4), UNRECOGNIZED(-1), ; @@ -224,7 +149,7 @@ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Event for start of a session.
+     * Event when the session is assigned to a user.
      * 
* * START = 1; @@ -250,6 +175,17 @@ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { * QUERY = 3; */ public static final int QUERY_VALUE = 3; + /** + * + * + *
+     * Event for creation of a cluster. It is not yet assigned to a user.
+     * This comes before START in the sequence
+     * 
+ * + * CREATE = 4; + */ + public static final int CREATE_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -283,6 +219,8 @@ public static EventType forNumber(int value) { return STOP; case 3: return QUERY; + case 4: + return CREATE; default: return null; } @@ -513,91 +451,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - queryId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - queryText_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - engine_ = rawValue; - break; - } - case 34: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (duration_ != null) { - subBuilder = duration_.toBuilder(); - } - duration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(duration_); - duration_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - resultSizeBytes_ = input.readInt64(); - break; - } - case 48: - { - dataProcessedBytes_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.LogsProto .internal_static_google_cloud_dataplex_v1_SessionEvent_QueryDetail_descriptor; @@ -1024,7 +877,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dataProcessedBytes_ != 0L) { output.writeInt64(6, dataProcessedBytes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1053,7 +906,7 @@ public int getSerializedSize() { if (dataProcessedBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, dataProcessedBytes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1078,7 +931,7 @@ public boolean equals(final java.lang.Object obj) { } if (getResultSizeBytes() != other.getResultSizeBytes()) return false; if (getDataProcessedBytes() != other.getDataProcessedBytes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1103,7 +956,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getResultSizeBytes()); hash = (37 * hash) + DATA_PROCESSED_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDataProcessedBytes()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1235,17 +1088,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.SessionEvent.QueryDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1376,7 +1222,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.SessionEvent.QueryDetail o if (other.getDataProcessedBytes() != 0L) { setDataProcessedBytes(other.getDataProcessedBytes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1391,18 +1237,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.SessionEvent.QueryDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queryId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + queryText_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + engine_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + resultSizeBytes_ = input.readInt64(); + + break; + } // case 40 + case 48: + { + dataProcessedBytes_ = input.readInt64(); + + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.SessionEvent.QueryDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2027,7 +1922,19 @@ public QueryDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2145,7 +2052,8 @@ public com.google.protobuf.ByteString getMessageBytes() { * * *
-   * The information about the user that created the session.
+   * The information about the user that created the session. It will be the
+   * email address of the user.
    * 
* * string user_id = 2; @@ -2168,7 +2076,8 @@ public java.lang.String getUserId() { * * *
-   * The information about the user that created the session.
+   * The information about the user that created the session. It will be the
+   * email address of the user.
    * 
* * string user_id = 2; @@ -2326,6 +2235,91 @@ public com.google.cloud.dataplex.v1.SessionEvent.QueryDetailOrBuilder getQueryOr return com.google.cloud.dataplex.v1.SessionEvent.QueryDetail.getDefaultInstance(); } + public static final int EVENT_SUCCEEDED_FIELD_NUMBER = 6; + private boolean eventSucceeded_; + /** + * + * + *
+   * The status of the event.
+   * 
+ * + * bool event_succeeded = 6; + * + * @return The eventSucceeded. + */ + @java.lang.Override + public boolean getEventSucceeded() { + return eventSucceeded_; + } + + public static final int FAST_STARTUP_ENABLED_FIELD_NUMBER = 7; + private boolean fastStartupEnabled_; + /** + * + * + *
+   * If the session is associated with an Environment with fast startup enabled,
+   * and was pre-created before being assigned to a user.
+   * 
+ * + * bool fast_startup_enabled = 7; + * + * @return The fastStartupEnabled. + */ + @java.lang.Override + public boolean getFastStartupEnabled() { + return fastStartupEnabled_; + } + + public static final int UNASSIGNED_DURATION_FIELD_NUMBER = 8; + private com.google.protobuf.Duration unassignedDuration_; + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return Whether the unassignedDuration field is set. + */ + @java.lang.Override + public boolean hasUnassignedDuration() { + return unassignedDuration_ != null; + } + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return The unassignedDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getUnassignedDuration() { + return unassignedDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : unassignedDuration_; + } + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getUnassignedDurationOrBuilder() { + return getUnassignedDuration(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2356,7 +2350,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (detailCase_ == 5) { output.writeMessage(5, (com.google.cloud.dataplex.v1.SessionEvent.QueryDetail) detail_); } - unknownFields.writeTo(output); + if (eventSucceeded_ != false) { + output.writeBool(6, eventSucceeded_); + } + if (fastStartupEnabled_ != false) { + output.writeBool(7, fastStartupEnabled_); + } + if (unassignedDuration_ != null) { + output.writeMessage(8, getUnassignedDuration()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2383,7 +2386,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.cloud.dataplex.v1.SessionEvent.QueryDetail) detail_); } - size += unknownFields.getSerializedSize(); + if (eventSucceeded_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, eventSucceeded_); + } + if (fastStartupEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, fastStartupEnabled_); + } + if (unassignedDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUnassignedDuration()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2403,6 +2415,12 @@ public boolean equals(final java.lang.Object obj) { if (!getUserId().equals(other.getUserId())) return false; if (!getSessionId().equals(other.getSessionId())) return false; if (type_ != other.type_) return false; + if (getEventSucceeded() != other.getEventSucceeded()) return false; + if (getFastStartupEnabled() != other.getFastStartupEnabled()) return false; + if (hasUnassignedDuration() != other.hasUnassignedDuration()) return false; + if (hasUnassignedDuration()) { + if (!getUnassignedDuration().equals(other.getUnassignedDuration())) return false; + } if (!getDetailCase().equals(other.getDetailCase())) return false; switch (detailCase_) { case 5: @@ -2411,7 +2429,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2430,6 +2448,14 @@ public int hashCode() { hash = (53 * hash) + getSessionId().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; + hash = (37 * hash) + EVENT_SUCCEEDED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEventSucceeded()); + hash = (37 * hash) + FAST_STARTUP_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFastStartupEnabled()); + if (hasUnassignedDuration()) { + hash = (37 * hash) + UNASSIGNED_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getUnassignedDuration().hashCode(); + } switch (detailCase_) { case 5: hash = (37 * hash) + QUERY_FIELD_NUMBER; @@ -2438,7 +2464,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2568,17 +2594,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.SessionEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2592,6 +2611,19 @@ public Builder clear() { type_ = 0; + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + eventSucceeded_ = false; + + fastStartupEnabled_ = false; + + if (unassignedDurationBuilder_ == null) { + unassignedDuration_ = null; + } else { + unassignedDuration_ = null; + unassignedDurationBuilder_ = null; + } detailCase_ = 0; detail_ = null; return this; @@ -2632,6 +2664,13 @@ public com.google.cloud.dataplex.v1.SessionEvent buildPartial() { result.detail_ = queryBuilder_.build(); } } + result.eventSucceeded_ = eventSucceeded_; + result.fastStartupEnabled_ = fastStartupEnabled_; + if (unassignedDurationBuilder_ == null) { + result.unassignedDuration_ = unassignedDuration_; + } else { + result.unassignedDuration_ = unassignedDurationBuilder_.build(); + } result.detailCase_ = detailCase_; onBuilt(); return result; @@ -2697,6 +2736,15 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.SessionEvent other) { if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + if (other.getEventSucceeded() != false) { + setEventSucceeded(other.getEventSucceeded()); + } + if (other.getFastStartupEnabled() != false) { + setFastStartupEnabled(other.getFastStartupEnabled()); + } + if (other.hasUnassignedDuration()) { + mergeUnassignedDuration(other.getUnassignedDuration()); + } switch (other.getDetailCase()) { case QUERY: { @@ -2708,7 +2756,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.SessionEvent other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2723,17 +2771,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.SessionEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + userId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + sessionId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + type_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + detailCase_ = 5; + break; + } // case 42 + case 48: + { + eventSucceeded_ = input.readBool(); + + break; + } // case 48 + case 56: + { + fastStartupEnabled_ = input.readBool(); + + break; + } // case 56 + case 66: + { + input.readMessage( + getUnassignedDurationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.SessionEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2862,7 +2973,8 @@ public Builder setMessageBytes(com.google.protobuf.ByteString value) { * * *
-     * The information about the user that created the session.
+     * The information about the user that created the session. It will be the
+     * email address of the user.
      * 
* * string user_id = 2; @@ -2884,7 +2996,8 @@ public java.lang.String getUserId() { * * *
-     * The information about the user that created the session.
+     * The information about the user that created the session. It will be the
+     * email address of the user.
      * 
* * string user_id = 2; @@ -2906,7 +3019,8 @@ public com.google.protobuf.ByteString getUserIdBytes() { * * *
-     * The information about the user that created the session.
+     * The information about the user that created the session. It will be the
+     * email address of the user.
      * 
* * string user_id = 2; @@ -2927,7 +3041,8 @@ public Builder setUserId(java.lang.String value) { * * *
-     * The information about the user that created the session.
+     * The information about the user that created the session. It will be the
+     * email address of the user.
      * 
* * string user_id = 2; @@ -2944,7 +3059,8 @@ public Builder clearUserId() { * * *
-     * The information about the user that created the session.
+     * The information about the user that created the session. It will be the
+     * email address of the user.
      * 
* * string user_id = 2; @@ -3373,6 +3489,298 @@ public com.google.cloud.dataplex.v1.SessionEvent.QueryDetailOrBuilder getQueryOr return queryBuilder_; } + private boolean eventSucceeded_; + /** + * + * + *
+     * The status of the event.
+     * 
+ * + * bool event_succeeded = 6; + * + * @return The eventSucceeded. + */ + @java.lang.Override + public boolean getEventSucceeded() { + return eventSucceeded_; + } + /** + * + * + *
+     * The status of the event.
+     * 
+ * + * bool event_succeeded = 6; + * + * @param value The eventSucceeded to set. + * @return This builder for chaining. + */ + public Builder setEventSucceeded(boolean value) { + + eventSucceeded_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of the event.
+     * 
+ * + * bool event_succeeded = 6; + * + * @return This builder for chaining. + */ + public Builder clearEventSucceeded() { + + eventSucceeded_ = false; + onChanged(); + return this; + } + + private boolean fastStartupEnabled_; + /** + * + * + *
+     * If the session is associated with an Environment with fast startup enabled,
+     * and was pre-created before being assigned to a user.
+     * 
+ * + * bool fast_startup_enabled = 7; + * + * @return The fastStartupEnabled. + */ + @java.lang.Override + public boolean getFastStartupEnabled() { + return fastStartupEnabled_; + } + /** + * + * + *
+     * If the session is associated with an Environment with fast startup enabled,
+     * and was pre-created before being assigned to a user.
+     * 
+ * + * bool fast_startup_enabled = 7; + * + * @param value The fastStartupEnabled to set. + * @return This builder for chaining. + */ + public Builder setFastStartupEnabled(boolean value) { + + fastStartupEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the session is associated with an Environment with fast startup enabled,
+     * and was pre-created before being assigned to a user.
+     * 
+ * + * bool fast_startup_enabled = 7; + * + * @return This builder for chaining. + */ + public Builder clearFastStartupEnabled() { + + fastStartupEnabled_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Duration unassignedDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + unassignedDurationBuilder_; + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return Whether the unassignedDuration field is set. + */ + public boolean hasUnassignedDuration() { + return unassignedDurationBuilder_ != null || unassignedDuration_ != null; + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return The unassignedDuration. + */ + public com.google.protobuf.Duration getUnassignedDuration() { + if (unassignedDurationBuilder_ == null) { + return unassignedDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : unassignedDuration_; + } else { + return unassignedDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public Builder setUnassignedDuration(com.google.protobuf.Duration value) { + if (unassignedDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + unassignedDuration_ = value; + onChanged(); + } else { + unassignedDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public Builder setUnassignedDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (unassignedDurationBuilder_ == null) { + unassignedDuration_ = builderForValue.build(); + onChanged(); + } else { + unassignedDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public Builder mergeUnassignedDuration(com.google.protobuf.Duration value) { + if (unassignedDurationBuilder_ == null) { + if (unassignedDuration_ != null) { + unassignedDuration_ = + com.google.protobuf.Duration.newBuilder(unassignedDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + unassignedDuration_ = value; + } + onChanged(); + } else { + unassignedDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public Builder clearUnassignedDuration() { + if (unassignedDurationBuilder_ == null) { + unassignedDuration_ = null; + onChanged(); + } else { + unassignedDuration_ = null; + unassignedDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public com.google.protobuf.Duration.Builder getUnassignedDurationBuilder() { + + onChanged(); + return getUnassignedDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + public com.google.protobuf.DurationOrBuilder getUnassignedDurationOrBuilder() { + if (unassignedDurationBuilder_ != null) { + return unassignedDurationBuilder_.getMessageOrBuilder(); + } else { + return unassignedDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : unassignedDuration_; + } + } + /** + * + * + *
+     * The idle duration of a warm pooled session before it is assigned to user.
+     * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getUnassignedDurationFieldBuilder() { + if (unassignedDurationBuilder_ == null) { + unassignedDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getUnassignedDuration(), getParentForChildren(), isClean()); + unassignedDuration_ = null; + } + return unassignedDurationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -3405,7 +3813,18 @@ public SessionEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SessionEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEventOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEventOrBuilder.java index aaef33297f59..484697b9f5b6 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEventOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionEventOrBuilder.java @@ -52,7 +52,8 @@ public interface SessionEventOrBuilder * * *
-   * The information about the user that created the session.
+   * The information about the user that created the session. It will be the
+   * email address of the user.
    * 
* * string user_id = 2; @@ -64,7 +65,8 @@ public interface SessionEventOrBuilder * * *
-   * The information about the user that created the session.
+   * The information about the user that created the session. It will be the
+   * email address of the user.
    * 
* * string user_id = 2; @@ -158,5 +160,67 @@ public interface SessionEventOrBuilder */ com.google.cloud.dataplex.v1.SessionEvent.QueryDetailOrBuilder getQueryOrBuilder(); + /** + * + * + *
+   * The status of the event.
+   * 
+ * + * bool event_succeeded = 6; + * + * @return The eventSucceeded. + */ + boolean getEventSucceeded(); + + /** + * + * + *
+   * If the session is associated with an Environment with fast startup enabled,
+   * and was pre-created before being assigned to a user.
+   * 
+ * + * bool fast_startup_enabled = 7; + * + * @return The fastStartupEnabled. + */ + boolean getFastStartupEnabled(); + + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return Whether the unassignedDuration field is set. + */ + boolean hasUnassignedDuration(); + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + * + * @return The unassignedDuration. + */ + com.google.protobuf.Duration getUnassignedDuration(); + /** + * + * + *
+   * The idle duration of a warm pooled session before it is assigned to user.
+   * 
+ * + * .google.protobuf.Duration unassigned_duration = 8; + */ + com.google.protobuf.DurationOrBuilder getUnassignedDurationOrBuilder(); + public com.google.cloud.dataplex.v1.SessionEvent.DetailCase getDetailCase(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/StorageFormat.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/StorageFormat.java index 968347e50e06..64fa56f9d71b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/StorageFormat.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/StorageFormat.java @@ -54,104 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StorageFormat( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - format_ = rawValue; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - compressionFormat_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 82: - { - com.google.cloud.dataplex.v1.StorageFormat.CsvOptions.Builder subBuilder = null; - if (optionsCase_ == 10) { - subBuilder = - ((com.google.cloud.dataplex.v1.StorageFormat.CsvOptions) options_).toBuilder(); - } - options_ = - input.readMessage( - com.google.cloud.dataplex.v1.StorageFormat.CsvOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.StorageFormat.CsvOptions) options_); - options_ = subBuilder.buildPartial(); - } - optionsCase_ = 10; - break; - } - case 90: - { - com.google.cloud.dataplex.v1.StorageFormat.JsonOptions.Builder subBuilder = null; - if (optionsCase_ == 11) { - subBuilder = - ((com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_).toBuilder(); - } - options_ = - input.readMessage( - com.google.cloud.dataplex.v1.StorageFormat.JsonOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_); - options_ = subBuilder.buildPartial(); - } - optionsCase_ = 11; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_StorageFormat_descriptor; @@ -840,71 +742,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CsvOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - encoding_ = s; - break; - } - case 16: - { - headerRows_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - delimiter_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - quote_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_StorageFormat_CsvOptions_descriptor; @@ -1118,7 +955,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, quote_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1139,7 +976,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, quote_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1159,7 +996,7 @@ public boolean equals(final java.lang.Object obj) { if (getHeaderRows() != other.getHeaderRows()) return false; if (!getDelimiter().equals(other.getDelimiter())) return false; if (!getQuote().equals(other.getQuote())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1178,7 +1015,7 @@ public int hashCode() { hash = (53 * hash) + getDelimiter().hashCode(); hash = (37 * hash) + QUOTE_FIELD_NUMBER; hash = (53 * hash) + getQuote().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1310,17 +1147,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.StorageFormat.CsvOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1432,7 +1262,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.StorageFormat.CsvOptions o quote_ = other.quote_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1447,18 +1277,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.StorageFormat.CsvOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + headerRows_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + delimiter_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + quote_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.StorageFormat.CsvOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1883,7 +1750,19 @@ public CsvOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CsvOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1968,52 +1847,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private JsonOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - encoding_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_StorageFormat_JsonOptions_descriptor; @@ -2097,7 +1930,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encoding_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, encoding_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2109,7 +1942,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encoding_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, encoding_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2126,7 +1959,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) obj; if (!getEncoding().equals(other.getEncoding())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2139,7 +1972,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENCODING_FIELD_NUMBER; hash = (53 * hash) + getEncoding().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2271,17 +2104,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.StorageFormat.JsonOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2373,7 +2199,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.StorageFormat.JsonOptions encoding_ = other.encoding_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2388,18 +2214,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.StorageFormat.JsonOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2547,7 +2392,19 @@ public JsonOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2919,7 +2776,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (optionsCase_ == 11) { output.writeMessage(11, (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2951,7 +2808,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.dataplex.v1.StorageFormat.JsonOptions) options_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2981,7 +2838,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3010,7 +2867,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3139,17 +2996,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.StorageFormat.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3161,6 +3011,12 @@ public Builder clear() { mimeType_ = ""; + if (csvBuilder_ != null) { + csvBuilder_.clear(); + } + if (jsonBuilder_ != null) { + jsonBuilder_.clear(); + } optionsCase_ = 0; options_ = null; return this; @@ -3283,7 +3139,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.StorageFormat other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3298,17 +3154,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.StorageFormat parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + format_ = input.readEnum(); + + break; + } // case 8 + case 16: + { + compressionFormat_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + mimeType_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 82: + { + input.readMessage(getCsvFieldBuilder().getBuilder(), extensionRegistry); + optionsCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getJsonFieldBuilder().getBuilder(), extensionRegistry); + optionsCase_ = 11; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.StorageFormat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4199,7 +4099,18 @@ public StorageFormat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageFormat(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Task.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Task.java index 6ef4e8089061..8d303443f4f7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Task.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Task.java @@ -56,191 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Task( - 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(); - - uid_ = s; - break; - } - case 26: - { - 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 34: - { - 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 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 802: - { - com.google.cloud.dataplex.v1.Task.TriggerSpec.Builder subBuilder = null; - if (triggerSpec_ != null) { - subBuilder = triggerSpec_.toBuilder(); - } - triggerSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.TriggerSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(triggerSpec_); - triggerSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 810: - { - com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder subBuilder = null; - if (executionSpec_ != null) { - subBuilder = executionSpec_.toBuilder(); - } - executionSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.ExecutionSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionSpec_); - executionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 1610: - { - com.google.cloud.dataplex.v1.Task.ExecutionStatus.Builder subBuilder = null; - if (executionStatus_ != null) { - subBuilder = executionStatus_.toBuilder(); - } - executionStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.ExecutionStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionStatus_); - executionStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 2402: - { - com.google.cloud.dataplex.v1.Task.SparkTaskConfig.Builder subBuilder = null; - if (configCase_ == 300) { - subBuilder = - ((com.google.cloud.dataplex.v1.Task.SparkTaskConfig) config_).toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.SparkTaskConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataplex.v1.Task.SparkTaskConfig) config_); - config_ = subBuilder.buildPartial(); - } - configCase_ = 300; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_descriptor; @@ -427,114 +242,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InfrastructureSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 418: - { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.Builder - subBuilder = null; - if (resourcesCase_ == 52) { - subBuilder = - ((com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - resources_) - .toBuilder(); - } - resources_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - resources_); - resources_ = subBuilder.buildPartial(); - } - resourcesCase_ = 52; - break; - } - case 810: - { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.Builder - subBuilder = null; - if (runtimeCase_ == 101) { - subBuilder = - ((com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - runtime_) - .toBuilder(); - } - runtime_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - runtime_); - runtime_ = subBuilder.buildPartial(); - } - runtimeCase_ = 101; - break; - } - case 1202: - { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.Builder subBuilder = - null; - if (networkCase_ == 150) { - subBuilder = - ((com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) network_) - .toBuilder(); - } - network_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) network_); - network_ = subBuilder.buildPartial(); - } - networkCase_ = 150; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.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.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_InfrastructureSpec_descriptor; @@ -616,56 +323,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BatchComputeResources( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - executorsCount_ = input.readInt32(); - break; - } - case 16: - { - maxExecutorsCount_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_InfrastructureSpec_BatchComputeResources_descriptor; @@ -741,7 +398,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxExecutorsCount_ != 0) { output.writeInt32(2, maxExecutorsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -756,7 +413,7 @@ public int getSerializedSize() { if (maxExecutorsCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExecutorsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -776,7 +433,7 @@ public boolean equals(final java.lang.Object obj) { if (getExecutorsCount() != other.getExecutorsCount()) return false; if (getMaxExecutorsCount() != other.getMaxExecutorsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -791,7 +448,7 @@ public int hashCode() { hash = (53 * hash) + getExecutorsCount(); hash = (37 * hash) + MAX_EXECUTORS_COUNT_FIELD_NUMBER; hash = (53 * hash) + getMaxExecutorsCount(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -934,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1050,7 +700,7 @@ public Builder mergeFrom( if (other.getMaxExecutorsCount() != 0) { setMaxExecutorsCount(other.getMaxExecutorsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1065,20 +715,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + executorsCount_ = input.readInt32(); + + break; + } // case 8 + case 16: + { + maxExecutorsCount_ = input.readInt32(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1232,7 +905,19 @@ public BatchComputeResources parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchComputeResources(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1530,95 +1215,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ContainerImageRuntime( - 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(); - - image_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - javaJars_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - javaJars_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pythonPackages_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pythonPackages_.add(s); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - javaJars_ = javaJars_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pythonPackages_ = pythonPackages_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_InfrastructureSpec_ContainerImageRuntime_descriptor; @@ -1987,7 +1583,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 4); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2025,7 +1621,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, properties__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2047,7 +1643,7 @@ public boolean equals(final java.lang.Object obj) { if (!getJavaJarsList().equals(other.getJavaJarsList())) return false; if (!getPythonPackagesList().equals(other.getPythonPackagesList())) return false; if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2072,7 +1668,7 @@ public int hashCode() { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + internalGetProperties().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2235,17 +1831,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2385,7 +1974,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2400,20 +1989,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureJavaJarsIsMutable(); + javaJars_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePythonPackagesIsMutable(); + pythonPackages_.add(s); + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry properties__ = + input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProperties() + .getMutableMap() + .put(properties__.getKey(), properties__.getValue()); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3153,7 +2784,19 @@ public ContainerImageRuntime parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContainerImageRuntime(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3343,74 +2986,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpcNetwork( - 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(); - networkNameCase_ = 1; - networkName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - networkNameCase_ = 2; - networkName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkTags_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_InfrastructureSpec_VpcNetwork_descriptor; @@ -3700,7 +3275,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkTags_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, networkTags_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3723,7 +3298,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getNetworkTagsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3751,7 +3326,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3778,7 +3353,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3913,17 +3488,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4060,7 +3628,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4075,19 +3643,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + networkNameCase_ = 1; + networkName_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + networkNameCase_ = 2; + networkName_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkTagsIsMutable(); + networkTags_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4584,7 +4185,19 @@ public VpcNetwork parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpcNetwork(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4939,7 +4552,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 150, (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4967,7 +4580,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 150, (com.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5007,7 +4620,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5042,7 +4655,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5174,22 +4787,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Task.InfrastructureSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.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 (batchBuilder_ != null) { + batchBuilder_.clear(); + } + if (containerImageBuilder_ != null) { + containerImageBuilder_.clear(); + } + if (vpcNetworkBuilder_ != null) { + vpcNetworkBuilder_.clear(); + } resourcesCase_ = 0; resources_ = null; runtimeCase_ = 0; @@ -5332,7 +4947,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.InfrastructureSpec ot break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5347,18 +4962,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 418: + { + input.readMessage(getBatchFieldBuilder().getBuilder(), extensionRegistry); + resourcesCase_ = 52; + break; + } // case 418 + case 810: + { + input.readMessage( + getContainerImageFieldBuilder().getBuilder(), extensionRegistry); + runtimeCase_ = 101; + break; + } // case 810 + case 1202: + { + input.readMessage(getVpcNetworkFieldBuilder().getBuilder(), extensionRegistry); + networkCase_ = 150; + break; + } // case 1202 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.InfrastructureSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6153,7 +5800,19 @@ public InfrastructureSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InfrastructureSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6373,84 +6032,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TriggerSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 32: - { - disabled_ = input.readBool(); - break; - } - case 40: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 56: - { - maxRetries_ = input.readInt32(); - break; - } - case 802: - { - java.lang.String s = input.readStringRequireUtf8(); - triggerCase_ = 100; - trigger_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_TriggerSpec_descriptor; @@ -6924,7 +6505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (triggerCase_ == 100) { com.google.protobuf.GeneratedMessageV3.writeString(output, 100, trigger_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6949,7 +6530,7 @@ public int getSerializedSize() { if (triggerCase_ == 100) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, trigger_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6980,7 +6561,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7009,7 +6590,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7140,17 +6721,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Task.TriggerSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7286,7 +6860,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.TriggerSpec other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7301,17 +6875,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.TriggerSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 32: + { + disabled_ = input.readBool(); + + break; + } // case 32 + case 40: + { + type_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 56: + { + maxRetries_ = input.readInt32(); + + break; + } // case 56 + case 802: + { + java.lang.String s = input.readStringRequireUtf8(); + triggerCase_ = 100; + trigger_ = s; + break; + } // case 802 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Task.TriggerSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7966,7 +7585,19 @@ public TriggerSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TriggerSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8266,95 +7897,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExecutionSpec( - 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 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = - com.google.protobuf.MapField.newMapField(ArgsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry args__ = - input.readMessage( - ArgsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - args_.getMutableMap().put(args__.getKey(), args__.getValue()); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 66: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (maxJobExecutionLifetime_ != null) { - subBuilder = maxJobExecutionLifetime_.toBuilder(); - } - maxJobExecutionLifetime_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxJobExecutionLifetime_); - maxJobExecutionLifetime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKey_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_ExecutionSpec_descriptor; @@ -8762,7 +8304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, kmsKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8795,7 +8337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, kmsKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8819,7 +8361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMaxJobExecutionLifetime().equals(other.getMaxJobExecutionLifetime())) return false; } if (!getKmsKey().equals(other.getKmsKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8844,7 +8386,7 @@ public int hashCode() { } hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; hash = (53 * hash) + getKmsKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8995,17 +8537,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Task.ExecutionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -9130,7 +8665,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.ExecutionSpec other) kmsKey_ = other.kmsKey_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9145,18 +8680,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.ExecutionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + com.google.protobuf.MapEntry args__ = + input.readMessage( + ArgsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableArgs().getMutableMap().put(args__.getKey(), args__.getValue()); + break; + } // case 34 + case 42: + { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 58: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + input.readMessage( + getMaxJobExecutionLifetimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + kmsKey_ = input.readStringRequireUtf8(); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.ExecutionSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9977,7 +9559,19 @@ public ExecutionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExecutionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10417,124 +10011,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SparkTaskConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fileUris_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - archiveUris_.add(s); - break; - } - case 50: - { - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder subBuilder = null; - if (infrastructureSpec_ != null) { - subBuilder = infrastructureSpec_.toBuilder(); - } - infrastructureSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Task.InfrastructureSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infrastructureSpec_); - infrastructureSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 802: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 100; - driver_ = s; - break; - } - case 810: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 101; - driver_ = s; - break; - } - case 818: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 102; - driver_ = s; - break; - } - case 834: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 104; - driver_ = s; - break; - } - case 842: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 105; - driver_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.TasksProto .internal_static_google_cloud_dataplex_v1_Task_SparkTaskConfig_descriptor; @@ -11222,7 +10698,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (driverCase_ == 105) { com.google.protobuf.GeneratedMessageV3.writeString(output, 105, driver_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11266,7 +10742,7 @@ public int getSerializedSize() { if (driverCase_ == 105) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(105, driver_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11308,7 +10784,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11355,7 +10831,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11486,17 +10962,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Task.SparkTaskConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -11689,7 +11158,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.SparkTaskConfig other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11704,18 +11173,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.SparkTaskConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFileUrisIsMutable(); + fileUris_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureArchiveUrisIsMutable(); + archiveUris_.add(s); + break; + } // case 34 + case 50: + { + input.readMessage( + getInfrastructureSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 802: + { + java.lang.String s = input.readStringRequireUtf8(); + driverCase_ = 100; + driver_ = s; + break; + } // case 802 + case 810: + { + java.lang.String s = input.readStringRequireUtf8(); + driverCase_ = 101; + driver_ = s; + break; + } // case 810 + case 818: + { + java.lang.String s = input.readStringRequireUtf8(); + driverCase_ = 102; + driver_ = s; + break; + } // case 818 + case 834: + { + java.lang.String s = input.readStringRequireUtf8(); + driverCase_ = 104; + driver_ = s; + break; + } // case 834 + case 842: + { + java.lang.String s = input.readStringRequireUtf8(); + driverCase_ = 105; + driver_ = s; + break; + } // case 842 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.SparkTaskConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -13087,7 +12625,19 @@ public SparkTaskConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkTaskConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -13106,118 +12656,226 @@ public com.google.cloud.dataplex.v1.Task.SparkTaskConfig getDefaultInstanceForTy } } - public interface ExecutionStatusOrBuilder + public interface NotebookTaskConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Task.ExecutionStatus) + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Task.NotebookTaskConfig) com.google.protobuf.MessageOrBuilder { /** * * *
-     * Output only. Last update time of the status.
+     * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+     * file or the path to a Notebook Content. The execution args are accessible
+     * as environment variables
+     * (`TASK_key=value`).
+     * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebook. + */ + java.lang.String getNotebook(); + /** + * + * + *
+     * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+     * file or the path to a Notebook Content. The execution args are accessible
+     * as environment variables
+     * (`TASK_key=value`).
+     * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebook. + */ + com.google.protobuf.ByteString getNotebookBytes(); + + /** + * + * + *
+     * Optional. Infrastructure specification for the execution.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the updateTime field is set. + * @return Whether the infrastructureSpec field is set. */ - boolean hasUpdateTime(); + boolean hasInfrastructureSpec(); /** * * *
-     * Output only. Last update time of the status.
+     * Optional. Infrastructure specification for the execution.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The updateTime. + * @return The infrastructureSpec. */ - com.google.protobuf.Timestamp getUpdateTime(); + com.google.cloud.dataplex.v1.Task.InfrastructureSpec getInfrastructureSpec(); /** * * *
-     * Output only. Last update time of the status.
+     * Optional. Infrastructure specification for the execution.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder getInfrastructureSpecOrBuilder(); /** * * *
-     * Output only. latest job execution
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
      * 
* - * - * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @return Whether the latestJob field is set. + * @return A list containing the fileUris. */ - boolean hasLatestJob(); + java.util.List getFileUrisList(); /** * * *
-     * Output only. latest job execution
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
      * 
* - * - * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The latestJob. + * @return The count of fileUris. */ - com.google.cloud.dataplex.v1.Job getLatestJob(); + int getFileUrisCount(); /** * * *
-     * Output only. latest job execution
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
      * 
* - * - * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fileUris at the given index. */ - com.google.cloud.dataplex.v1.JobOrBuilder getLatestJobOrBuilder(); + java.lang.String getFileUris(int index); + /** + * + * + *
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
+     * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fileUris at the given index. + */ + com.google.protobuf.ByteString getFileUrisBytes(int index); + + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the archiveUris. + */ + java.util.List getArchiveUrisList(); + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of archiveUris. + */ + int getArchiveUrisCount(); + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The archiveUris at the given index. + */ + java.lang.String getArchiveUris(int index); + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the archiveUris at the given index. + */ + com.google.protobuf.ByteString getArchiveUrisBytes(int index); } /** * * *
-   * Status of the task execution (e.g. Jobs).
+   * Config for running scheduled notebooks.
    * 
* - * Protobuf type {@code google.cloud.dataplex.v1.Task.ExecutionStatus} + * Protobuf type {@code google.cloud.dataplex.v1.Task.NotebookTaskConfig} */ - public static final class ExecutionStatus extends com.google.protobuf.GeneratedMessageV3 + public static final class NotebookTaskConfig extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Task.ExecutionStatus) - ExecutionStatusOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Task.NotebookTaskConfig) + NotebookTaskConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use ExecutionStatus.newBuilder() to construct. - private ExecutionStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use NotebookTaskConfig.newBuilder() to construct. + private NotebookTaskConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ExecutionStatus() {} + private NotebookTaskConfig() { + notebook_ = ""; + fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecutionStatus(); + return new NotebookTaskConfig(); } @java.lang.Override @@ -13225,73 +12883,1592 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExecutionStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.class, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder.class); + } + + public static final int NOTEBOOK_FIELD_NUMBER = 4; + private volatile java.lang.Object notebook_; + /** + * + * + *
+     * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+     * file or the path to a Notebook Content. The execution args are accessible
+     * as environment variables
+     * (`TASK_key=value`).
+     * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebook. + */ + @java.lang.Override + public java.lang.String getNotebook() { + java.lang.Object ref = notebook_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebook_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+     * file or the path to a Notebook Content. The execution args are accessible
+     * as environment variables
+     * (`TASK_key=value`).
+     * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookBytes() { + java.lang.Object ref = notebook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFRASTRUCTURE_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructureSpec_; + /** + * + * + *
+     * Optional. Infrastructure specification for the execution.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the infrastructureSpec field is set. + */ + @java.lang.Override + public boolean hasInfrastructureSpec() { + return infrastructureSpec_ != null; + } + /** + * + * + *
+     * Optional. Infrastructure specification for the execution.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The infrastructureSpec. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.InfrastructureSpec getInfrastructureSpec() { + return infrastructureSpec_ == null + ? com.google.cloud.dataplex.v1.Task.InfrastructureSpec.getDefaultInstance() + : infrastructureSpec_; + } + /** + * + * + *
+     * Optional. Infrastructure specification for the execution.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder + getInfrastructureSpecOrBuilder() { + return getInfrastructureSpec(); + } + + public static final int FILE_URIS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList fileUris_; + /** + * + * + *
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
+     * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fileUris. + */ + public com.google.protobuf.ProtocolStringList getFileUrisList() { + return fileUris_; + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
+     * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fileUris. + */ + public int getFileUrisCount() { + return fileUris_.size(); + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
+     * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fileUris at the given index. + */ + public java.lang.String getFileUris(int index) { + return fileUris_.get(index); + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+     * executor.
+     * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fileUris at the given index. + */ + public com.google.protobuf.ByteString getFileUrisBytes(int index) { + return fileUris_.getByteString(index); + } + + public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList archiveUris_; + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the archiveUris. + */ + public com.google.protobuf.ProtocolStringList getArchiveUrisList() { + return archiveUris_; + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of archiveUris. + */ + public int getArchiveUrisCount() { + return archiveUris_.size(); + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The archiveUris at the given index. + */ + public java.lang.String getArchiveUris(int index) { + return archiveUris_.get(index); + } + /** + * + * + *
+     * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+     * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+     * .zip.
+     * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the archiveUris at the given index. + */ + public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { + return archiveUris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (infrastructureSpec_ != null) { + output.writeMessage(3, getInfrastructureSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notebook_); + } + for (int i = 0; i < fileUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); + } + for (int i = 0; i < archiveUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infrastructureSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInfrastructureSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notebook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notebook_); + } + { + int dataSize = 0; + for (int i = 0; i < fileUris_.size(); i++) { + dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getFileUrisList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < archiveUris_.size(); i++) { + dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getArchiveUrisList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = 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.dataplex.v1.Task.NotebookTaskConfig)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig other = + (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) obj; + + if (!getNotebook().equals(other.getNotebook())) return false; + if (hasInfrastructureSpec() != other.hasInfrastructureSpec()) return false; + if (hasInfrastructureSpec()) { + if (!getInfrastructureSpec().equals(other.getInfrastructureSpec())) return false; + } + if (!getFileUrisList().equals(other.getFileUrisList())) return false; + if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NOTEBOOK_FIELD_NUMBER; + hash = (53 * hash) + getNotebook().hashCode(); + if (hasInfrastructureSpec()) { + hash = (37 * hash) + INFRASTRUCTURE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getInfrastructureSpec().hashCode(); + } + if (getFileUrisCount() > 0) { + hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; + hash = (53 * hash) + getFileUrisList().hashCode(); + } + if (getArchiveUrisCount() > 0) { + hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; + hash = (53 * hash) + getArchiveUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig 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.dataplex.v1.Task.NotebookTaskConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + 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.dataplex.v1.Task.NotebookTaskConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + java.io.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.dataplex.v1.Task.NotebookTaskConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseDelimitedFrom( + java.io.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.dataplex.v1.Task.NotebookTaskConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.dataplex.v1.Task.NotebookTaskConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Config for running scheduled notebooks.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.Task.NotebookTaskConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Task.NotebookTaskConfig) + com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.class, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + notebook_ = ""; + + if (infrastructureSpecBuilder_ == null) { + infrastructureSpec_ = null; + } else { + infrastructureSpec_ = null; + infrastructureSpecBuilder_ = null; + } + fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig build() { + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig buildPartial() { + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig result = + new com.google.cloud.dataplex.v1.Task.NotebookTaskConfig(this); + int from_bitField0_ = bitField0_; + result.notebook_ = notebook_; + if (infrastructureSpecBuilder_ == null) { + result.infrastructureSpec_ = infrastructureSpec_; + } else { + result.infrastructureSpec_ = infrastructureSpecBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + fileUris_ = fileUris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileUris_ = fileUris_; + if (((bitField0_ & 0x00000002) != 0)) { + archiveUris_ = archiveUris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.archiveUris_ = archiveUris_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.dataplex.v1.Task.NotebookTaskConfig) { + return mergeFrom((com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.NotebookTaskConfig other) { + if (other == com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance()) + return this; + if (!other.getNotebook().isEmpty()) { + notebook_ = other.notebook_; + onChanged(); + } + if (other.hasInfrastructureSpec()) { + mergeInfrastructureSpec(other.getInfrastructureSpec()); + } + if (!other.fileUris_.isEmpty()) { + if (fileUris_.isEmpty()) { + fileUris_ = other.fileUris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileUrisIsMutable(); + fileUris_.addAll(other.fileUris_); + } + onChanged(); + } + if (!other.archiveUris_.isEmpty()) { + if (archiveUris_.isEmpty()) { + archiveUris_ = other.archiveUris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureArchiveUrisIsMutable(); + archiveUris_.addAll(other.archiveUris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + getInfrastructureSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + notebook_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFileUrisIsMutable(); + fileUris_.add(s); + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureArchiveUrisIsMutable(); + archiveUris_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object notebook_ = ""; + /** + * + * + *
+       * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+       * file or the path to a Notebook Content. The execution args are accessible
+       * as environment variables
+       * (`TASK_key=value`).
+       * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebook. + */ + public java.lang.String getNotebook() { + java.lang.Object ref = notebook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+       * file or the path to a Notebook Content. The execution args are accessible
+       * as environment variables
+       * (`TASK_key=value`).
+       * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebook. + */ + public com.google.protobuf.ByteString getNotebookBytes() { + java.lang.Object ref = notebook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+       * file or the path to a Notebook Content. The execution args are accessible
+       * as environment variables
+       * (`TASK_key=value`).
+       * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The notebook to set. + * @return This builder for chaining. + */ + public Builder setNotebook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notebook_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+       * file or the path to a Notebook Content. The execution args are accessible
+       * as environment variables
+       * (`TASK_key=value`).
+       * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNotebook() { + + notebook_ = getDefaultInstance().getNotebook(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Path to input notebook. This can be the Cloud Storage URI of the notebook
+       * file or the path to a Notebook Content. The execution args are accessible
+       * as environment variables
+       * (`TASK_key=value`).
+       * 
+ * + * string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for notebook to set. + * @return This builder for chaining. + */ + public Builder setNotebookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notebook_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructureSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.InfrastructureSpec, + com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder, + com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder> + infrastructureSpecBuilder_; + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the infrastructureSpec field is set. + */ + public boolean hasInfrastructureSpec() { + return infrastructureSpecBuilder_ != null || infrastructureSpec_ != null; + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The infrastructureSpec. + */ + public com.google.cloud.dataplex.v1.Task.InfrastructureSpec getInfrastructureSpec() { + if (infrastructureSpecBuilder_ == null) { + return infrastructureSpec_ == null + ? com.google.cloud.dataplex.v1.Task.InfrastructureSpec.getDefaultInstance() + : infrastructureSpec_; + } else { + return infrastructureSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInfrastructureSpec( + com.google.cloud.dataplex.v1.Task.InfrastructureSpec value) { + if (infrastructureSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infrastructureSpec_ = value; + onChanged(); + } else { + infrastructureSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInfrastructureSpec( + com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder builderForValue) { + if (infrastructureSpecBuilder_ == null) { + infrastructureSpec_ = builderForValue.build(); + onChanged(); + } else { + infrastructureSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInfrastructureSpec( + com.google.cloud.dataplex.v1.Task.InfrastructureSpec value) { + if (infrastructureSpecBuilder_ == null) { + if (infrastructureSpec_ != null) { + infrastructureSpec_ = + com.google.cloud.dataplex.v1.Task.InfrastructureSpec.newBuilder(infrastructureSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + infrastructureSpec_ = value; + } + onChanged(); + } else { + infrastructureSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInfrastructureSpec() { + if (infrastructureSpecBuilder_ == null) { + infrastructureSpec_ = null; + onChanged(); + } else { + infrastructureSpec_ = null; + infrastructureSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder + getInfrastructureSpecBuilder() { + + onChanged(); + return getInfrastructureSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder + getInfrastructureSpecOrBuilder() { + if (infrastructureSpecBuilder_ != null) { + return infrastructureSpecBuilder_.getMessageOrBuilder(); + } else { + return infrastructureSpec_ == null + ? com.google.cloud.dataplex.v1.Task.InfrastructureSpec.getDefaultInstance() + : infrastructureSpec_; + } + } + /** + * + * + *
+       * Optional. Infrastructure specification for the execution.
+       * 
+ * + * + * .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.InfrastructureSpec, + com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder, + com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder> + getInfrastructureSpecFieldBuilder() { + if (infrastructureSpecBuilder_ == null) { + infrastructureSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.InfrastructureSpec, + com.google.cloud.dataplex.v1.Task.InfrastructureSpec.Builder, + com.google.cloud.dataplex.v1.Task.InfrastructureSpecOrBuilder>( + getInfrastructureSpec(), getParentForChildren(), isClean()); + infrastructureSpec_ = null; + } + return infrastructureSpecBuilder_; + } + + private com.google.protobuf.LazyStringList fileUris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFileUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fileUris. + */ + public com.google.protobuf.ProtocolStringList getFileUrisList() { + return fileUris_.getUnmodifiableView(); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fileUris. + */ + public int getFileUrisCount() { + return fileUris_.size(); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fileUris at the given index. + */ + public java.lang.String getFileUris(int index) { + return fileUris_.get(index); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fileUris at the given index. + */ + public com.google.protobuf.ByteString getFileUrisBytes(int index) { + return fileUris_.getByteString(index); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The fileUris to set. + * @return This builder for chaining. + */ + public Builder setFileUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileUrisIsMutable(); + fileUris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fileUris to add. + * @return This builder for chaining. + */ + public Builder addFileUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileUrisIsMutable(); + fileUris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The fileUris to add. + * @return This builder for chaining. + */ + public Builder addAllFileUris(java.lang.Iterable values) { + ensureFileUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFileUris() { + fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of files to be placed in the working directory of each
+       * executor.
+       * 
+ * + * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the fileUris to add. + * @return This builder for chaining. + */ + public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFileUrisIsMutable(); + fileUris_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList archiveUris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArchiveUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the archiveUris. + */ + public com.google.protobuf.ProtocolStringList getArchiveUrisList() { + return archiveUris_.getUnmodifiableView(); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of archiveUris. + */ + public int getArchiveUrisCount() { + return archiveUris_.size(); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The archiveUris at the given index. + */ + public java.lang.String getArchiveUris(int index) { + return archiveUris_.get(index); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the archiveUris at the given index. + */ + public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { + return archiveUris_.getByteString(index); + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The archiveUris to set. + * @return This builder for chaining. + */ + public Builder setArchiveUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchiveUrisIsMutable(); + archiveUris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The archiveUris to add. + * @return This builder for chaining. + */ + public Builder addArchiveUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchiveUrisIsMutable(); + archiveUris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The archiveUris to add. + * @return This builder for chaining. + */ + public Builder addAllArchiveUris(java.lang.Iterable values) { + ensureArchiveUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearArchiveUris() { + archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Cloud Storage URIs of archives to be extracted into the working directory
+       * of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and
+       * .zip.
+       * 
+ * + * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the archiveUris to add. + * @return This builder for chaining. + */ + public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArchiveUrisIsMutable(); + archiveUris_.add(value); + onChanged(); + return this; } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - break; - } - case 74: - { - com.google.cloud.dataplex.v1.Job.Builder subBuilder = null; - if (latestJob_ != null) { - subBuilder = latestJob_.toBuilder(); - } - latestJob_ = - input.readMessage(com.google.cloud.dataplex.v1.Job.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latestJob_); - latestJob_ = subBuilder.buildPartial(); - } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.Task.NotebookTaskConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Task.NotebookTaskConfig) + private static final com.google.cloud.dataplex.v1.Task.NotebookTaskConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + } + + public static com.google.cloud.dataplex.v1.Task.NotebookTaskConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebookTaskConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static 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.dataplex.v1.Task.NotebookTaskConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecutionStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Task.ExecutionStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Last update time of the status.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Output only. Last update time of the status.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Output only. Last update time of the status.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. latest job execution
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the latestJob field is set. + */ + boolean hasLatestJob(); + /** + * + * + *
+     * Output only. latest job execution
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The latestJob. + */ + com.google.cloud.dataplex.v1.Job getLatestJob(); + /** + * + * + *
+     * Output only. latest job execution
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.JobOrBuilder getLatestJobOrBuilder(); + } + /** + * + * + *
+   * Status of the task execution (e.g. Jobs).
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.Task.ExecutionStatus} + */ + public static final class ExecutionStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Task.ExecutionStatus) + ExecutionStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionStatus.newBuilder() to construct. + private ExecutionStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionStatus() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -13435,7 +14612,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (latestJob_ != null) { output.writeMessage(9, getLatestJob()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13450,7 +14627,7 @@ public int getSerializedSize() { if (latestJob_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLatestJob()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13474,7 +14651,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLatestJob()) { if (!getLatestJob().equals(other.getLatestJob())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13493,7 +14670,7 @@ public int hashCode() { hash = (37 * hash) + LATEST_JOB_FIELD_NUMBER; hash = (53 * hash) + getLatestJob().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13624,17 +14801,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Task.ExecutionStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -13747,7 +14917,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task.ExecutionStatus other if (other.hasLatestJob()) { mergeLatestJob(other.getLatestJob()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -13762,18 +14932,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task.ExecutionStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 74: + { + input.readMessage(getLatestJobFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Task.ExecutionStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -14216,7 +15411,19 @@ public ExecutionStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExecutionStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14243,6 +15450,7 @@ public enum ConfigCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SPARK(300), + NOTEBOOK(302), CONFIG_NOT_SET(0); private final int value; @@ -14263,6 +15471,8 @@ public static ConfigCase forNumber(int value) { switch (value) { case 300: return SPARK; + case 302: + return NOTEBOOK; case 0: return CONFIG_NOT_SET; default: @@ -14931,6 +16141,57 @@ public com.google.cloud.dataplex.v1.Task.SparkTaskConfigOrBuilder getSparkOrBuil return com.google.cloud.dataplex.v1.Task.SparkTaskConfig.getDefaultInstance(); } + public static final int NOTEBOOK_FIELD_NUMBER = 302; + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return Whether the notebook field is set. + */ + @java.lang.Override + public boolean hasNotebook() { + return configCase_ == 302; + } + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return The notebook. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig getNotebook() { + if (configCase_ == 302) { + return (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_; + } + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder getNotebookOrBuilder() { + if (configCase_ == 302) { + return (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_; + } + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -14980,7 +16241,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (configCase_ == 300) { output.writeMessage(300, (com.google.cloud.dataplex.v1.Task.SparkTaskConfig) config_); } - unknownFields.writeTo(output); + if (configCase_ == 302) { + output.writeMessage(302, (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -15034,7 +16298,12 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 300, (com.google.cloud.dataplex.v1.Task.SparkTaskConfig) config_); } - size += unknownFields.getSerializedSize(); + if (configCase_ == 302) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 302, (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -15080,10 +16349,13 @@ public boolean equals(final java.lang.Object obj) { case 300: if (!getSpark().equals(other.getSpark())) return false; break; + case 302: + if (!getNotebook().equals(other.getNotebook())) return false; + break; case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15133,10 +16405,14 @@ public int hashCode() { hash = (37 * hash) + SPARK_FIELD_NUMBER; hash = (53 * hash) + getSpark().hashCode(); break; + case 302: + hash = (37 * hash) + NOTEBOOK_FIELD_NUMBER; + hash = (53 * hash) + getNotebook().hashCode(); + break; case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15284,17 +16560,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Task.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -15341,6 +16610,12 @@ public Builder clear() { executionStatus_ = null; executionStatusBuilder_ = null; } + if (sparkBuilder_ != null) { + sparkBuilder_.clear(); + } + if (notebookBuilder_ != null) { + notebookBuilder_.clear(); + } configCase_ = 0; config_ = null; return this; @@ -15409,6 +16684,13 @@ public com.google.cloud.dataplex.v1.Task buildPartial() { result.config_ = sparkBuilder_.build(); } } + if (configCase_ == 302) { + if (notebookBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = notebookBuilder_.build(); + } + } result.configCase_ = configCase_; onBuilt(); return result; @@ -15500,12 +16782,17 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Task other) { mergeSpark(other.getSpark()); break; } + case NOTEBOOK: + { + mergeNotebook(other.getNotebook()); + break; + } case CONFIG_NOT_SET: { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -15520,17 +16807,114 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Task parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + case 802: + { + input.readMessage(getTriggerSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 802 + case 810: + { + input.readMessage(getExecutionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 810 + case 1610: + { + input.readMessage(getExecutionStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1610 + case 2402: + { + input.readMessage(getSparkFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 300; + break; + } // case 2402 + case 2418: + { + input.readMessage(getNotebookFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 302; + break; + } // case 2418 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Task) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -17478,6 +18862,217 @@ public com.google.cloud.dataplex.v1.Task.SparkTaskConfigOrBuilder getSparkOrBuil return sparkBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder> + notebookBuilder_; + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return Whether the notebook field is set. + */ + @java.lang.Override + public boolean hasNotebook() { + return configCase_ == 302; + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return The notebook. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig getNotebook() { + if (notebookBuilder_ == null) { + if (configCase_ == 302) { + return (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_; + } + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } else { + if (configCase_ == 302) { + return notebookBuilder_.getMessage(); + } + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + public Builder setNotebook(com.google.cloud.dataplex.v1.Task.NotebookTaskConfig value) { + if (notebookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + notebookBuilder_.setMessage(value); + } + configCase_ = 302; + return this; + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + public Builder setNotebook( + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder builderForValue) { + if (notebookBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + notebookBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 302; + return this; + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + public Builder mergeNotebook(com.google.cloud.dataplex.v1.Task.NotebookTaskConfig value) { + if (notebookBuilder_ == null) { + if (configCase_ == 302 + && config_ + != com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance()) { + config_ = + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.newBuilder( + (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 302) { + notebookBuilder_.mergeFrom(value); + } else { + notebookBuilder_.setMessage(value); + } + } + configCase_ = 302; + return this; + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + public Builder clearNotebook() { + if (notebookBuilder_ == null) { + if (configCase_ == 302) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 302) { + configCase_ = 0; + config_ = null; + } + notebookBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder getNotebookBuilder() { + return getNotebookFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder getNotebookOrBuilder() { + if ((configCase_ == 302) && (notebookBuilder_ != null)) { + return notebookBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 302) { + return (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_; + } + return com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config related to running scheduled Notebooks.
+     * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder> + getNotebookFieldBuilder() { + if (notebookBuilder_ == null) { + if (!(configCase_ == 302)) { + config_ = com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.getDefaultInstance(); + } + notebookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig.Builder, + com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder>( + (com.google.cloud.dataplex.v1.Task.NotebookTaskConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 302; + onChanged(); + ; + return notebookBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -17510,7 +19105,18 @@ public Task parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Task(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TaskOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TaskOrBuilder.java index 7d37ebe4b6ed..331b36caf1d3 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TaskOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TaskOrBuilder.java @@ -453,5 +453,40 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.dataplex.v1.Task.SparkTaskConfigOrBuilder getSparkOrBuilder(); + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return Whether the notebook field is set. + */ + boolean hasNotebook(); + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + * + * @return The notebook. + */ + com.google.cloud.dataplex.v1.Task.NotebookTaskConfig getNotebook(); + /** + * + * + *
+   * Config related to running scheduled Notebooks.
+   * 
+ * + * .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; + */ + com.google.cloud.dataplex.v1.Task.NotebookTaskConfigOrBuilder getNotebookOrBuilder(); + public com.google.cloud.dataplex.v1.Task.ConfigCase getConfigCase(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java index f7c7f302059a..5db8a78c8a6a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java @@ -67,6 +67,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_Task_SparkTaskConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_Task_SparkTaskConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataplex_v1_Task_ExecutionStatus_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -93,7 +97,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ld_behavior.proto\032\031google/api/resource.p" + "roto\032(google/cloud/dataplex/v1/resources" + ".proto\032\036google/protobuf/duration.proto\032\037" - + "google/protobuf/timestamp.proto\"\241\024\n\004Task" + + "google/protobuf/timestamp.proto\"\237\026\n\004Task" + "\0222\n\004name\030\001 \001(\tB$\340A\003\372A\036\n\034dataplex.googlea" + "pis.com/Task\022\020\n\003uid\030\002 \001(\tB\003\340A\003\0224\n\013create" + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" @@ -110,74 +114,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\0132..google.cloud.dataplex.v1.Task.Execu" + "tionStatusB\003\340A\003\022@\n\005spark\030\254\002 \001(\0132..google" + ".cloud.dataplex.v1.Task.SparkTaskConfigH" - + "\000\032\232\006\n\022InfrastructureSpec\022X\n\005batch\0304 \001(\0132" - + "G.google.cloud.dataplex.v1.Task.Infrastr" - + "uctureSpec.BatchComputeResourcesH\000\022b\n\017co" - + "ntainer_image\030e \001(\0132G.google.cloud.datap" - + "lex.v1.Task.InfrastructureSpec.Container" - + "ImageRuntimeH\001\022T\n\013vpc_network\030\226\001 \001(\0132<.g" - + "oogle.cloud.dataplex.v1.Task.Infrastruct" - + "ureSpec.VpcNetworkH\002\032W\n\025BatchComputeReso" - + "urces\022\034\n\017executors_count\030\001 \001(\005B\003\340A\001\022 \n\023m" - + "ax_executors_count\030\002 \001(\005B\003\340A\001\032\206\002\n\025Contai" - + "nerImageRuntime\022\022\n\005image\030\001 \001(\tB\003\340A\001\022\026\n\tj" - + "ava_jars\030\002 \003(\tB\003\340A\001\022\034\n\017python_packages\030\003" - + " \003(\tB\003\340A\001\022p\n\nproperties\030\004 \003(\0132W.google.c" - + "loud.dataplex.v1.Task.InfrastructureSpec" - + ".ContainerImageRuntime.PropertiesEntryB\003" - + "\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\032k\n\nVpcNetwork\022\026\n\007network\030" - + "\001 \001(\tB\003\340A\001H\000\022\032\n\013sub_network\030\002 \001(\tB\003\340A\001H\000" - + "\022\031\n\014network_tags\030\003 \003(\tB\003\340A\001B\016\n\014network_n" - + "ameB\013\n\tresourcesB\t\n\007runtimeB\t\n\007network\032\232" - + "\002\n\013TriggerSpec\022E\n\004type\030\005 \001(\0162/.google.cl" - + "oud.dataplex.v1.Task.TriggerSpec.TypeB\006\340" - + "A\002\340A\005\0223\n\nstart_time\030\006 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\001\022\025\n\010disabled\030\004 \001(\010B\003\340A" - + "\001\022\030\n\013max_retries\030\007 \001(\005B\003\340A\001\022\027\n\010schedule\030" - + "d \001(\tB\003\340A\001H\000\":\n\004Type\022\024\n\020TYPE_UNSPECIFIED" - + "\020\000\022\r\n\tON_DEMAND\020\001\022\r\n\tRECURRING\020\002B\t\n\007trig" - + "ger\032\225\002\n\rExecutionSpec\022I\n\004args\030\004 \003(\01326.go" - + "ogle.cloud.dataplex.v1.Task.ExecutionSpe" - + "c.ArgsEntryB\003\340A\001\022\034\n\017service_account\030\005 \001(" - + "\tB\003\340A\002\022\024\n\007project\030\007 \001(\tB\003\340A\001\022B\n\032max_job_" - + "execution_lifetime\030\010 \001(\0132\031.google.protob" - + "uf.DurationB\003\340A\001\022\024\n\007kms_key\030\t \001(\tB\003\340A\001\032+" - + "\n\tArgsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\032\245\002\n\017SparkTaskConfig\022\033\n\021main_jar_file" - + "_uri\030d \001(\tH\000\022\024\n\nmain_class\030e \001(\tH\000\022\034\n\022py" - + "thon_script_file\030f \001(\tH\000\022\031\n\017sql_script_f" - + "ile\030h \001(\tH\000\022\024\n\nsql_script\030i \001(\tH\000\022\026\n\tfil" - + "e_uris\030\003 \003(\tB\003\340A\001\022\031\n\014archive_uris\030\004 \003(\tB" - + "\003\340A\001\022S\n\023infrastructure_spec\030\006 \001(\01321.goog" - + "le.cloud.dataplex.v1.Task.Infrastructure" - + "SpecB\003\340A\001B\010\n\006driver\032\177\n\017ExecutionStatus\0224" - + "\n\013update_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\0226\n\nlatest_job\030\t \001(\0132\035.googl" - + "e.cloud.dataplex.v1.JobB\003\340A\003\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:d\352Aa" - + "\n\034dataplex.googleapis.com/Task\022Aprojects" - + "/{project}/locations/{location}/lakes/{l" - + "ake}/tasks/{task}B\010\n\006config\"\210\005\n\003Job\0221\n\004n" - + "ame\030\001 \001(\tB#\340A\003\372A\035\n\033dataplex.googleapis.c" - + "om/Job\022\020\n\003uid\030\002 \001(\tB\003\340A\003\0223\n\nstart_time\030\003" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" - + "\010end_time\030\004 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0227\n\005state\030\005 \001(\0162#.google.cloud.d" - + "ataplex.v1.Job.StateB\003\340A\003\022\030\n\013retry_count" - + "\030\006 \001(\rB\003\340A\003\022;\n\007service\030\007 \001(\0162%.google.cl" - + "oud.dataplex.v1.Job.ServiceB\003\340A\003\022\030\n\013serv" - + "ice_job\030\010 \001(\tB\003\340A\003\022\024\n\007message\030\t \001(\tB\003\340A\003" - + "\"0\n\007Service\022\027\n\023SERVICE_UNSPECIFIED\020\000\022\014\n\010" - + "DATAPROC\020\001\"r\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELLING\020\002\022\r\n\tCANCE" - + "LLED\020\003\022\r\n\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\013\n\007ABO" - + "RTED\020\006:n\352Ak\n\033dataplex.googleapis.com/Job" - + "\022Lprojects/{project}/locations/{location" - + "}/lakes/{lake}/tasks/{task}/jobs/{job}Bn" - + "\n\034com.google.cloud.dataplex.v1B\nTasksPro" - + "toP\001Z@google.golang.org/genproto/googlea" - + "pis/cloud/dataplex/v1;dataplexb\006proto3" + + "\000\022F\n\010notebook\030\256\002 \001(\01321.google.cloud.data" + + "plex.v1.Task.NotebookTaskConfigH\000\032\232\006\n\022In" + + "frastructureSpec\022X\n\005batch\0304 \001(\0132G.google" + + ".cloud.dataplex.v1.Task.InfrastructureSp" + + "ec.BatchComputeResourcesH\000\022b\n\017container_" + + "image\030e \001(\0132G.google.cloud.dataplex.v1.T" + + "ask.InfrastructureSpec.ContainerImageRun" + + "timeH\001\022T\n\013vpc_network\030\226\001 \001(\0132<.google.cl" + + "oud.dataplex.v1.Task.InfrastructureSpec." + + "VpcNetworkH\002\032W\n\025BatchComputeResources\022\034\n" + + "\017executors_count\030\001 \001(\005B\003\340A\001\022 \n\023max_execu" + + "tors_count\030\002 \001(\005B\003\340A\001\032\206\002\n\025ContainerImage" + + "Runtime\022\022\n\005image\030\001 \001(\tB\003\340A\001\022\026\n\tjava_jars" + + "\030\002 \003(\tB\003\340A\001\022\034\n\017python_packages\030\003 \003(\tB\003\340A" + + "\001\022p\n\nproperties\030\004 \003(\0132W.google.cloud.dat" + + "aplex.v1.Task.InfrastructureSpec.Contain" + + "erImageRuntime.PropertiesEntryB\003\340A\001\0321\n\017P" + + "ropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\032k\n\nVpcNetwork\022\026\n\007network\030\001 \001(\tB\003\340" + + "A\001H\000\022\032\n\013sub_network\030\002 \001(\tB\003\340A\001H\000\022\031\n\014netw" + + "ork_tags\030\003 \003(\tB\003\340A\001B\016\n\014network_nameB\013\n\tr" + + "esourcesB\t\n\007runtimeB\t\n\007network\032\232\002\n\013Trigg" + + "erSpec\022E\n\004type\030\005 \001(\0162/.google.cloud.data" + + "plex.v1.Task.TriggerSpec.TypeB\006\340A\002\340A\005\0223\n" + + "\nstart_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\001\022\025\n\010disabled\030\004 \001(\010B\003\340A\001\022\030\n\013max" + + "_retries\030\007 \001(\005B\003\340A\001\022\027\n\010schedule\030d \001(\tB\003\340" + + "A\001H\000\":\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\r\n\tON" + + "_DEMAND\020\001\022\r\n\tRECURRING\020\002B\t\n\007trigger\032\225\002\n\r" + + "ExecutionSpec\022I\n\004args\030\004 \003(\01326.google.clo" + + "ud.dataplex.v1.Task.ExecutionSpec.ArgsEn" + + "tryB\003\340A\001\022\034\n\017service_account\030\005 \001(\tB\003\340A\002\022\024" + + "\n\007project\030\007 \001(\tB\003\340A\001\022B\n\032max_job_executio" + + "n_lifetime\030\010 \001(\0132\031.google.protobuf.Durat" + + "ionB\003\340A\001\022\024\n\007kms_key\030\t \001(\tB\003\340A\001\032+\n\tArgsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\245\002\n\017" + + "SparkTaskConfig\022\033\n\021main_jar_file_uri\030d \001" + + "(\tH\000\022\024\n\nmain_class\030e \001(\tH\000\022\034\n\022python_scr" + + "ipt_file\030f \001(\tH\000\022\031\n\017sql_script_file\030h \001(" + + "\tH\000\022\024\n\nsql_script\030i \001(\tH\000\022\026\n\tfile_uris\030\003" + + " \003(\tB\003\340A\001\022\031\n\014archive_uris\030\004 \003(\tB\003\340A\001\022S\n\023" + + "infrastructure_spec\030\006 \001(\01321.google.cloud" + + ".dataplex.v1.Task.InfrastructureSpecB\003\340A" + + "\001B\010\n\006driver\032\263\001\n\022NotebookTaskConfig\022\025\n\010no" + + "tebook\030\004 \001(\tB\003\340A\002\022S\n\023infrastructure_spec" + + "\030\003 \001(\01321.google.cloud.dataplex.v1.Task.I" + + "nfrastructureSpecB\003\340A\001\022\026\n\tfile_uris\030\005 \003(" + + "\tB\003\340A\001\022\031\n\014archive_uris\030\006 \003(\tB\003\340A\001\032\177\n\017Exe" + + "cutionStatus\0224\n\013update_time\030\003 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0226\n\nlatest_job" + + "\030\t \001(\0132\035.google.cloud.dataplex.v1.JobB\003\340" + + "A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001:d\352Aa\n\034dataplex.googleapis.com/" + + "Task\022Aprojects/{project}/locations/{loca" + + "tion}/lakes/{lake}/tasks/{task}B\010\n\006confi" + + "g\"\210\005\n\003Job\0221\n\004name\030\001 \001(\tB#\340A\003\372A\035\n\033dataple" + + "x.googleapis.com/Job\022\020\n\003uid\030\002 \001(\tB\003\340A\003\0223" + + "\n\nstart_time\030\003 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\0221\n\010end_time\030\004 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0227\n\005state\030\005 \001(\0162#." + + "google.cloud.dataplex.v1.Job.StateB\003\340A\003\022" + + "\030\n\013retry_count\030\006 \001(\rB\003\340A\003\022;\n\007service\030\007 \001" + + "(\0162%.google.cloud.dataplex.v1.Job.Servic" + + "eB\003\340A\003\022\030\n\013service_job\030\010 \001(\tB\003\340A\003\022\024\n\007mess" + + "age\030\t \001(\tB\003\340A\003\"0\n\007Service\022\027\n\023SERVICE_UNS" + + "PECIFIED\020\000\022\014\n\010DATAPROC\020\001\"r\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\nCANCELL" + + "ING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004\022\n\n\006F" + + "AILED\020\005\022\013\n\007ABORTED\020\006:n\352Ak\n\033dataplex.goog" + + "leapis.com/Job\022Lprojects/{project}/locat" + + "ions/{location}/lakes/{lake}/tasks/{task" + + "}/jobs/{job}Bn\n\034com.google.cloud.dataple" + + "x.v1B\nTasksProtoP\001Z@google.golang.org/ge" + + "nproto/googleapis/cloud/dataplex/v1;data" + + "plexb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -207,6 +218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutionSpec", "ExecutionStatus", "Spark", + "Notebook", "Config", }); internal_static_google_cloud_dataplex_v1_Task_InfrastructureSpec_descriptor = @@ -299,8 +311,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InfrastructureSpec", "Driver", }); - internal_static_google_cloud_dataplex_v1_Task_ExecutionStatus_descriptor = + internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor = internal_static_google_cloud_dataplex_v1_Task_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_Task_NotebookTaskConfig_descriptor, + new java.lang.String[] { + "Notebook", "InfrastructureSpec", "FileUris", "ArchiveUris", + }); + internal_static_google_cloud_dataplex_v1_Task_ExecutionStatus_descriptor = + internal_static_google_cloud_dataplex_v1_Task_descriptor.getNestedTypes().get(5); internal_static_google_cloud_dataplex_v1_Task_ExecutionStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_Task_ExecutionStatus_descriptor, @@ -308,7 +328,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateTime", "LatestJob", }); internal_static_google_cloud_dataplex_v1_Task_LabelsEntry_descriptor = - internal_static_google_cloud_dataplex_v1_Task_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_dataplex_v1_Task_descriptor.getNestedTypes().get(6); internal_static_google_cloud_dataplex_v1_Task_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_Task_LabelsEntry_descriptor, diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateAssetRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateAssetRequest.java index 567825167708..ce8a5fa395ba 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateAssetRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateAssetRequest.java @@ -50,80 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAssetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = - input.readMessage(com.google.cloud.dataplex.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_UpdateAssetRequest_descriptor; @@ -282,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -300,7 +226,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +251,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAsset().equals(other.getAsset())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +272,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -475,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateAssetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -602,7 +521,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateAssetRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -617,17 +536,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateAssetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.UpdateAssetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1107,7 +1058,18 @@ public UpdateAssetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAssetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequest.java index d9d2f5efabc6..411d5c28a244 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequest.java @@ -50,81 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Content.Builder subBuilder = null; - if (content_ != null) { - subBuilder = content_.toBuilder(); - } - content_ = - input.readMessage( - com.google.cloud.dataplex.v1.Content.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(content_); - content_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ContentProto .internal_static_google_cloud_dataplex_v1_UpdateContentRequest_descriptor; @@ -283,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -301,7 +226,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -326,7 +251,7 @@ public boolean equals(final java.lang.Object obj) { if (!getContent().equals(other.getContent())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -347,7 +272,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -603,7 +521,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateContentRequest other if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -618,18 +536,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateContentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getContentFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.UpdateContentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1073,18 @@ public UpdateContentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateContentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequest.java index 012d782e6340..83ce92b1106b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateEntityRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - com.google.cloud.dataplex.v1.Entity.Builder subBuilder = null; - if (entity_ != null) { - subBuilder = entity_.toBuilder(); - } - entity_ = - input.readMessage( - com.google.cloud.dataplex.v1.Entity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(entity_); - entity_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_UpdateEntityRequest_descriptor; @@ -216,7 +156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +171,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -252,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntity().equals(other.getEntity())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -269,7 +209,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -401,17 +341,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateEntityRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -514,7 +447,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateEntityRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -529,17 +462,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateEntityRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.UpdateEntityRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -820,7 +779,18 @@ public UpdateEntityRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateEntityRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequest.java index 91cb2f61306c..4cd66cc896ca 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequest.java @@ -50,81 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateEnvironmentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Environment.Builder subBuilder = null; - if (environment_ != null) { - subBuilder = environment_.toBuilder(); - } - environment_ = - input.readMessage( - com.google.cloud.dataplex.v1.Environment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(environment_); - environment_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_UpdateEnvironmentRequest_descriptor; @@ -288,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -306,7 +231,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEnvironment().equals(other.getEnvironment())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +277,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateEnvironmentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -609,7 +527,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateEnvironmentRequest o if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,18 +542,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateEnvironmentRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEnvironmentFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.UpdateEnvironmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1131,7 +1080,18 @@ public UpdateEnvironmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateEnvironmentRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateLakeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateLakeRequest.java index a771f660aa56..77390cd37454 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateLakeRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateLakeRequest.java @@ -50,80 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateLakeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Lake.Builder subBuilder = null; - if (lake_ != null) { - subBuilder = lake_.toBuilder(); - } - lake_ = - input.readMessage(com.google.cloud.dataplex.v1.Lake.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lake_); - lake_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_UpdateLakeRequest_descriptor; @@ -279,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +223,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -322,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLake().equals(other.getLake())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,7 +269,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +398,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateLakeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -598,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateLakeRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,17 +532,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateLakeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getLakeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.UpdateLakeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1103,7 +1054,18 @@ public UpdateLakeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateLakeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateTaskRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateTaskRequest.java index 90539a2bae5a..b593bb50ec4e 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateTaskRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateTaskRequest.java @@ -50,80 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateTaskRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Task.Builder subBuilder = null; - if (task_ != null) { - subBuilder = task_.toBuilder(); - } - task_ = - input.readMessage(com.google.cloud.dataplex.v1.Task.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(task_); - task_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_UpdateTaskRequest_descriptor; @@ -279,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +223,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -322,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTask().equals(other.getTask())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,7 +269,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +398,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateTaskRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -598,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateTaskRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,17 +532,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateTaskRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getTaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.UpdateTaskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1103,7 +1054,18 @@ public UpdateTaskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateTaskRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateZoneRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateZoneRequest.java index 69eefe7dcf8d..b2169f715eb4 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateZoneRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateZoneRequest.java @@ -50,80 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateZoneRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.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; - } - case 18: - { - com.google.cloud.dataplex.v1.Zone.Builder subBuilder = null; - if (zone_ != null) { - subBuilder = zone_.toBuilder(); - } - zone_ = - input.readMessage(com.google.cloud.dataplex.v1.Zone.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zone_); - zone_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ServiceProto .internal_static_google_cloud_dataplex_v1_UpdateZoneRequest_descriptor; @@ -279,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +223,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -322,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZone().equals(other.getZone())) return false; } if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,7 +269,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +398,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.UpdateZoneRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -598,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateZoneRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,17 +532,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.UpdateZoneRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getZoneFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.UpdateZoneRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1103,7 +1054,18 @@ public UpdateZoneRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateZoneRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Zone.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Zone.java index 4d07dee815f5..72f09482eb9c 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Zone.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Zone.java @@ -60,179 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Zone( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 72: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 826: - { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.Builder subBuilder = null; - if (discoverySpec_ != null) { - subBuilder = discoverySpec_.toBuilder(); - } - discoverySpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(discoverySpec_); - discoverySpec_ = subBuilder.buildPartial(); - } - - break; - } - case 834: - { - com.google.cloud.dataplex.v1.Zone.ResourceSpec.Builder subBuilder = null; - if (resourceSpec_ != null) { - subBuilder = resourceSpec_.toBuilder(); - } - resourceSpec_ = - input.readMessage( - com.google.cloud.dataplex.v1.Zone.ResourceSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceSpec_); - resourceSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 842: - { - com.google.cloud.dataplex.v1.AssetStatus.Builder subBuilder = null; - if (assetStatus_ != null) { - subBuilder = assetStatus_.toBuilder(); - } - assetStatus_ = - input.readMessage( - com.google.cloud.dataplex.v1.AssetStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(assetStatus_); - assetStatus_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Zone_descriptor; @@ -494,52 +321,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - locationType_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Zone_ResourceSpec_descriptor; @@ -775,7 +556,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, locationType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -789,7 +570,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, locationType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -806,7 +587,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.Zone.ResourceSpec) obj; if (locationType_ != other.locationType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -819,7 +600,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER; hash = (53 * hash) + locationType_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -950,17 +731,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Zone.ResourceSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1051,7 +825,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Zone.ResourceSpec other) { if (other.locationType_ != 0) { setLocationTypeValue(other.getLocationTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1066,17 +840,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Zone.ResourceSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + locationType_ = input.readEnum(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Zone.ResourceSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1222,7 +1016,19 @@ public ResourceSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1569,120 +1375,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiscoverySpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - enabled_ = input.readBool(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - includePatterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - includePatterns_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - excludePatterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - excludePatterns_.add(s); - break; - } - case 34: - { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.Builder subBuilder = - null; - if (csvOptions_ != null) { - subBuilder = csvOptions_.toBuilder(); - } - csvOptions_ = - input.readMessage( - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(csvOptions_); - csvOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.Builder subBuilder = - null; - if (jsonOptions_ != null) { - subBuilder = jsonOptions_.toBuilder(); - } - jsonOptions_ = - input.readMessage( - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jsonOptions_); - jsonOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - triggerCase_ = 10; - trigger_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - includePatterns_ = includePatterns_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - excludePatterns_ = excludePatterns_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Zone_DiscoverySpec_descriptor; @@ -1816,70 +1508,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CsvOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - headerRows_ = input.readInt32(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - delimiter_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - encoding_ = s; - break; - } - case 32: - { - disableTypeInference_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Zone_DiscoverySpec_CsvOptions_descriptor; @@ -2057,7 +1685,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableTypeInference_ != false) { output.writeBool(4, disableTypeInference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2078,7 +1706,7 @@ public int getSerializedSize() { if (disableTypeInference_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableTypeInference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2098,7 +1726,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDelimiter().equals(other.getDelimiter())) return false; if (!getEncoding().equals(other.getEncoding())) return false; if (getDisableTypeInference() != other.getDisableTypeInference()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2117,7 +1745,7 @@ public int hashCode() { hash = (53 * hash) + getEncoding().hashCode(); hash = (37 * hash) + DISABLE_TYPE_INFERENCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTypeInference()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2249,17 +1877,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2372,7 +1993,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOpti if (other.getDisableTypeInference() != false) { setDisableTypeInference(other.getDisableTypeInference()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2387,19 +2008,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + headerRows_ = input.readInt32(); + + break; + } // case 8 + case 18: + { + delimiter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + disableTypeInference_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2760,7 +2417,19 @@ public CsvOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CsvOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2859,58 +2528,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private JsonOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - encoding_ = s; - break; - } - case 16: - { - disableTypeInference_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.ResourcesProto .internal_static_google_cloud_dataplex_v1_Zone_DiscoverySpec_JsonOptions_descriptor; @@ -3015,7 +2632,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableTypeInference_ != false) { output.writeBool(2, disableTypeInference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3030,7 +2647,7 @@ public int getSerializedSize() { if (disableTypeInference_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, disableTypeInference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3048,7 +2665,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEncoding().equals(other.getEncoding())) return false; if (getDisableTypeInference() != other.getDisableTypeInference()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3063,7 +2680,7 @@ public int hashCode() { hash = (53 * hash) + getEncoding().hashCode(); hash = (37 * hash) + DISABLE_TYPE_INFERENCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTypeInference()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3195,17 +2812,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3306,7 +2916,7 @@ public Builder mergeFrom( if (other.getDisableTypeInference() != false) { setDisableTypeInference(other.getDisableTypeInference()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3321,19 +2931,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + encoding_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + disableTypeInference_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3536,7 +3170,19 @@ public JsonOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4004,7 +3650,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (triggerCase_ == 10) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, trigger_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4041,7 +3687,7 @@ public int getSerializedSize() { if (triggerCase_ == 10) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, trigger_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4076,7 +3722,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4113,7 +3759,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4244,17 +3890,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.dataplex.v1.Zone.DiscoverySpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4427,7 +4066,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Zone.DiscoverySpec other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4442,18 +4081,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Zone.DiscoverySpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludePatternsIsMutable(); + includePatterns_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludePatternsIsMutable(); + excludePatterns_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getCsvOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getJsonOptionsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + triggerCase_ = 10; + trigger_ = s; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataplex.v1.Zone.DiscoverySpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5573,7 +5264,19 @@ public DiscoverySpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiscoverySpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6283,7 +5986,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (assetStatus_ != null) { output.writeMessage(105, getAssetStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6335,7 +6038,7 @@ public int getSerializedSize() { if (assetStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(105, getAssetStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6377,7 +6080,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAssetStatus()) { if (!getAssetStatus().equals(other.getAssetStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6424,7 +6127,7 @@ public int hashCode() { hash = (37 * hash) + ASSET_STATUS_FIELD_NUMBER; hash = (53 * hash) + getAssetStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6575,17 +6278,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.dataplex.v1.Zone.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6781,7 +6477,7 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Zone other) { if (other.hasAssetStatus()) { mergeAssetStatus(other.getAssetStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6796,17 +6492,108 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.dataplex.v1.Zone parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + + break; + } // case 64 + case 72: + { + type_ = input.readEnum(); + + break; + } // case 72 + case 826: + { + input.readMessage(getDiscoverySpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 826 + case 834: + { + input.readMessage(getResourceSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 834 + case 842: + { + input.readMessage(getAssetStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 842 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataplex.v1.Zone) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8666,7 +8453,18 @@ public Zone parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Zone(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto index 51e48e46e708..0cec184809be 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.dataplex.v1; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -221,7 +222,7 @@ message SessionEvent { // An unspecified event type. EVENT_TYPE_UNSPECIFIED = 0; - // Event for start of a session. + // Event when the session is assigned to a user. START = 1; // Event for stop of a session. @@ -229,6 +230,10 @@ message SessionEvent { // Query events in the session. QUERY = 3; + + // Event for creation of a cluster. It is not yet assigned to a user. + // This comes before START in the sequence + CREATE = 4; } // Execution details of the query. @@ -267,7 +272,8 @@ message SessionEvent { // The log message. string message = 1; - // The information about the user that created the session. + // The information about the user that created the session. It will be the + // email address of the user. string user_id = 2; // Unique identifier for the session. @@ -281,4 +287,14 @@ message SessionEvent { // The execution details of the query. QueryDetail query = 5; } + + // The status of the event. + bool event_succeeded = 6; + + // If the session is associated with an Environment with fast startup enabled, + // and was pre-created before being assigned to a user. + bool fast_startup_enabled = 7; + + // The idle duration of a warm pooled session before it is assigned to user. + google.protobuf.Duration unassigned_duration = 8; } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto index 8ca33dac1ba3..214be25582e7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto @@ -238,6 +238,27 @@ message Task { InfrastructureSpec infrastructure_spec = 6 [(google.api.field_behavior) = OPTIONAL]; } + // Config for running scheduled notebooks. + message NotebookTaskConfig { + // Required. Path to input notebook. This can be the Cloud Storage URI of the notebook + // file or the path to a Notebook Content. The execution args are accessible + // as environment variables + // (`TASK_key=value`). + string notebook = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of files to be placed in the working directory of each + // executor. + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working directory + // of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and + // .zip. + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; + } + // Status of the task execution (e.g. Jobs). message ExecutionStatus { // Output only. Last update time of the status. @@ -292,6 +313,9 @@ message Task { oneof config { // Config related to running custom Spark tasks. SparkTaskConfig spark = 300; + + // Config related to running scheduled Notebooks. + NotebookTaskConfig notebook = 302; } } diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClient.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClient.java deleted file mode 100644 index 64b6146cbac6..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClient.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.security.publicca.v1beta1.stub.PublicCertificateAuthorityServiceStub; -import com.google.cloud.security.publicca.v1beta1.stub.PublicCertificateAuthorityServiceStubSettings; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Manages the resources required for ACME [external account - * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for the public certificate authority - * service. - * - *

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
- *     PublicCertificateAuthorityServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build();
- *   ExternalAccountKey response =
- *       publicCertificateAuthorityServiceClient.createExternalAccountKey(
- *           parent, externalAccountKey);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PublicCertificateAuthorityServiceSettings publicCertificateAuthorityServiceSettings =
- *     PublicCertificateAuthorityServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
- *     PublicCertificateAuthorityServiceClient.create(publicCertificateAuthorityServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PublicCertificateAuthorityServiceSettings publicCertificateAuthorityServiceSettings =
- *     PublicCertificateAuthorityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
- *     PublicCertificateAuthorityServiceClient.create(publicCertificateAuthorityServiceSettings);
- * }
- * - *

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PublicCertificateAuthorityServiceSettings publicCertificateAuthorityServiceSettings =
- *     PublicCertificateAuthorityServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             PublicCertificateAuthorityServiceSettings.defaultHttpJsonTransportProviderBuilder()
- *                 .build())
- *         .build();
- * PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
- *     PublicCertificateAuthorityServiceClient.create(publicCertificateAuthorityServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class PublicCertificateAuthorityServiceClient implements BackgroundResource { - private final PublicCertificateAuthorityServiceSettings settings; - private final PublicCertificateAuthorityServiceStub stub; - - /** Constructs an instance of PublicCertificateAuthorityServiceClient with default settings. */ - public static final PublicCertificateAuthorityServiceClient create() throws IOException { - return create(PublicCertificateAuthorityServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of PublicCertificateAuthorityServiceClient, 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 PublicCertificateAuthorityServiceClient create( - PublicCertificateAuthorityServiceSettings settings) throws IOException { - return new PublicCertificateAuthorityServiceClient(settings); - } - - /** - * Constructs an instance of PublicCertificateAuthorityServiceClient, using the given stub for - * making calls. This is for advanced usage - prefer using - * create(PublicCertificateAuthorityServiceSettings). - */ - public static final PublicCertificateAuthorityServiceClient create( - PublicCertificateAuthorityServiceStub stub) { - return new PublicCertificateAuthorityServiceClient(stub); - } - - /** - * Constructs an instance of PublicCertificateAuthorityServiceClient, 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 PublicCertificateAuthorityServiceClient( - PublicCertificateAuthorityServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = - ((PublicCertificateAuthorityServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected PublicCertificateAuthorityServiceClient(PublicCertificateAuthorityServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final PublicCertificateAuthorityServiceSettings getSettings() { - return settings; - } - - public PublicCertificateAuthorityServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] - * bound to the project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
-   *     PublicCertificateAuthorityServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build();
-   *   ExternalAccountKey response =
-   *       publicCertificateAuthorityServiceClient.createExternalAccountKey(
-   *           parent, externalAccountKey);
-   * }
-   * }
- * - * @param parent Required. The parent resource where this external_account_key will be created. - * Format: projects/[project_id]/locations/[location]. At present only the "global" location - * is supported. - * @param externalAccountKey Required. The external account key to create. This field only exists - * to future-proof the API. At present, all fields in ExternalAccountKey are output only and - * all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a - * default/empty value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ExternalAccountKey createExternalAccountKey( - LocationName parent, ExternalAccountKey externalAccountKey) { - CreateExternalAccountKeyRequest request = - CreateExternalAccountKeyRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setExternalAccountKey(externalAccountKey) - .build(); - return createExternalAccountKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] - * bound to the project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
-   *     PublicCertificateAuthorityServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build();
-   *   ExternalAccountKey response =
-   *       publicCertificateAuthorityServiceClient.createExternalAccountKey(
-   *           parent, externalAccountKey);
-   * }
-   * }
- * - * @param parent Required. The parent resource where this external_account_key will be created. - * Format: projects/[project_id]/locations/[location]. At present only the "global" location - * is supported. - * @param externalAccountKey Required. The external account key to create. This field only exists - * to future-proof the API. At present, all fields in ExternalAccountKey are output only and - * all values are ignored. For the purpose of the CreateExternalAccountKeyRequest, set it to a - * default/empty value. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ExternalAccountKey createExternalAccountKey( - String parent, ExternalAccountKey externalAccountKey) { - CreateExternalAccountKeyRequest request = - CreateExternalAccountKeyRequest.newBuilder() - .setParent(parent) - .setExternalAccountKey(externalAccountKey) - .build(); - return createExternalAccountKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] - * bound to the project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
-   *     PublicCertificateAuthorityServiceClient.create()) {
-   *   CreateExternalAccountKeyRequest request =
-   *       CreateExternalAccountKeyRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setExternalAccountKey(ExternalAccountKey.newBuilder().build())
-   *           .build();
-   *   ExternalAccountKey response =
-   *       publicCertificateAuthorityServiceClient.createExternalAccountKey(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 ExternalAccountKey createExternalAccountKey( - CreateExternalAccountKeyRequest request) { - return createExternalAccountKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] - * bound to the project. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
-   *     PublicCertificateAuthorityServiceClient.create()) {
-   *   CreateExternalAccountKeyRequest request =
-   *       CreateExternalAccountKeyRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setExternalAccountKey(ExternalAccountKey.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       publicCertificateAuthorityServiceClient
-   *           .createExternalAccountKeyCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   ExternalAccountKey response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createExternalAccountKeyCallable() { - return stub.createExternalAccountKeyCallable(); - } - - @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); - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceSettings.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceSettings.java deleted file mode 100644 index 191cdc58b9c3..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceSettings.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.security.publicca.v1beta1.stub.PublicCertificateAuthorityServiceStubSettings; -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 PublicCertificateAuthorityServiceClient}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PublicCertificateAuthorityServiceSettings.Builder
- *     publicCertificateAuthorityServiceSettingsBuilder =
- *         PublicCertificateAuthorityServiceSettings.newBuilder();
- * publicCertificateAuthorityServiceSettingsBuilder
- *     .createExternalAccountKeySettings()
- *     .setRetrySettings(
- *         publicCertificateAuthorityServiceSettingsBuilder
- *             .createExternalAccountKeySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * PublicCertificateAuthorityServiceSettings publicCertificateAuthorityServiceSettings =
- *     publicCertificateAuthorityServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class PublicCertificateAuthorityServiceSettings - extends ClientSettings { - - /** Returns the object with the settings used for calls to createExternalAccountKey. */ - public UnaryCallSettings - createExternalAccountKeySettings() { - return ((PublicCertificateAuthorityServiceStubSettings) getStubSettings()) - .createExternalAccountKeySettings(); - } - - public static final PublicCertificateAuthorityServiceSettings create( - PublicCertificateAuthorityServiceStubSettings stub) throws IOException { - return new PublicCertificateAuthorityServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return PublicCertificateAuthorityServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return PublicCertificateAuthorityServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return PublicCertificateAuthorityServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected PublicCertificateAuthorityServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for PublicCertificateAuthorityServiceSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(PublicCertificateAuthorityServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(PublicCertificateAuthorityServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(PublicCertificateAuthorityServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(PublicCertificateAuthorityServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(PublicCertificateAuthorityServiceStubSettings.newHttpJsonBuilder()); - } - - public PublicCertificateAuthorityServiceStubSettings.Builder getStubSettingsBuilder() { - return ((PublicCertificateAuthorityServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createExternalAccountKey. */ - public UnaryCallSettings.Builder - createExternalAccountKeySettings() { - return getStubSettingsBuilder().createExternalAccountKeySettings(); - } - - @Override - public PublicCertificateAuthorityServiceSettings build() throws IOException { - return new PublicCertificateAuthorityServiceSettings(this); - } - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/package-info.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/package-info.java deleted file mode 100644 index 013f413fed96..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/package-info.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Public Certificate Authority API - * - *

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

======================= PublicCertificateAuthorityServiceClient ======================= - * - *

Service Description: Manages the resources required for ACME [external account - * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for the public certificate authority - * service. - * - *

Sample for PublicCertificateAuthorityServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PublicCertificateAuthorityServiceClient publicCertificateAuthorityServiceClient =
- *     PublicCertificateAuthorityServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build();
- *   ExternalAccountKey response =
- *       publicCertificateAuthorityServiceClient.createExternalAccountKey(
- *           parent, externalAccountKey);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.security.publicca.v1beta1; - -import javax.annotation.Generated; diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceCallableFactory.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceCallableFactory.java deleted file mode 100644 index df85715c1144..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceCallableFactory.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.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.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the PublicCertificateAuthorityService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcPublicCertificateAuthorityServiceCallableFactory - implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceStub.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceStub.java deleted file mode 100644 index 1e4069342d5f..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/GrpcPublicCertificateAuthorityServiceStub.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.stub; - -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.UnaryCallable; -import com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest; -import com.google.cloud.security.publicca.v1beta1.ExternalAccountKey; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the PublicCertificateAuthorityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcPublicCertificateAuthorityServiceStub - extends PublicCertificateAuthorityServiceStub { - private static final MethodDescriptor - createExternalAccountKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService/CreateExternalAccountKey") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateExternalAccountKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ExternalAccountKey.getDefaultInstance())) - .build(); - - private final UnaryCallable - createExternalAccountKeyCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcPublicCertificateAuthorityServiceStub create( - PublicCertificateAuthorityServiceStubSettings settings) throws IOException { - return new GrpcPublicCertificateAuthorityServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcPublicCertificateAuthorityServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcPublicCertificateAuthorityServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcPublicCertificateAuthorityServiceStub, 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 GrpcPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcPublicCertificateAuthorityServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcPublicCertificateAuthorityServiceStub, 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 GrpcPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - createExternalAccountKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createExternalAccountKeyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.createExternalAccountKeyCallable = - callableFactory.createUnaryCallable( - createExternalAccountKeyTransportSettings, - settings.createExternalAccountKeySettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - createExternalAccountKeyCallable() { - return createExternalAccountKeyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceCallableFactory.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceCallableFactory.java deleted file mode 100644 index 9eea6b0e9a9f..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the PublicCertificateAuthorityService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonPublicCertificateAuthorityServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceStub.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceStub.java deleted file mode 100644 index 3d865d368ba6..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/HttpJsonPublicCertificateAuthorityServiceStub.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest; -import com.google.cloud.security.publicca.v1beta1.ExternalAccountKey; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the PublicCertificateAuthorityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonPublicCertificateAuthorityServiceStub - extends PublicCertificateAuthorityServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - createExternalAccountKeyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService/CreateExternalAccountKey") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{parent=projects/*/locations/*}/externalAccountKeys", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody( - "externalAccountKey", request.getExternalAccountKey(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExternalAccountKey.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable - createExternalAccountKeyCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonPublicCertificateAuthorityServiceStub create( - PublicCertificateAuthorityServiceStubSettings settings) throws IOException { - return new HttpJsonPublicCertificateAuthorityServiceStub( - settings, ClientContext.create(settings)); - } - - public static final HttpJsonPublicCertificateAuthorityServiceStub create( - ClientContext clientContext) throws IOException { - return new HttpJsonPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonPublicCertificateAuthorityServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonPublicCertificateAuthorityServiceStub, 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 HttpJsonPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonPublicCertificateAuthorityServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonPublicCertificateAuthorityServiceStub, 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 HttpJsonPublicCertificateAuthorityServiceStub( - PublicCertificateAuthorityServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - createExternalAccountKeyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createExternalAccountKeyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createExternalAccountKeyCallable = - callableFactory.createUnaryCallable( - createExternalAccountKeyTransportSettings, - settings.createExternalAccountKeySettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createExternalAccountKeyMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable - createExternalAccountKeyCallable() { - return createExternalAccountKeyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStub.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStub.java deleted file mode 100644 index 05e570a41c3f..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStub.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest; -import com.google.cloud.security.publicca.v1beta1.ExternalAccountKey; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the PublicCertificateAuthorityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class PublicCertificateAuthorityServiceStub implements BackgroundResource { - - public UnaryCallable - createExternalAccountKeyCallable() { - throw new UnsupportedOperationException("Not implemented: createExternalAccountKeyCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStubSettings.java b/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStubSettings.java deleted file mode 100644 index 691791f5d931..000000000000 --- a/java-publicca/google-cloud-publicca/src/main/java/com/google/cloud/security/publicca/v1beta1/stub/PublicCertificateAuthorityServiceStubSettings.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -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.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest; -import com.google.cloud.security.publicca.v1beta1.ExternalAccountKey; -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 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 PublicCertificateAuthorityServiceStub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PublicCertificateAuthorityServiceStubSettings.Builder
- *     publicCertificateAuthorityServiceSettingsBuilder =
- *         PublicCertificateAuthorityServiceStubSettings.newBuilder();
- * publicCertificateAuthorityServiceSettingsBuilder
- *     .createExternalAccountKeySettings()
- *     .setRetrySettings(
- *         publicCertificateAuthorityServiceSettingsBuilder
- *             .createExternalAccountKeySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * PublicCertificateAuthorityServiceStubSettings publicCertificateAuthorityServiceSettings =
- *     publicCertificateAuthorityServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class PublicCertificateAuthorityServiceStubSettings - extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings - createExternalAccountKeySettings; - - /** Returns the object with the settings used for calls to createExternalAccountKey. */ - public UnaryCallSettings - createExternalAccountKeySettings() { - return createExternalAccountKeySettings; - } - - public PublicCertificateAuthorityServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcPublicCertificateAuthorityServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonPublicCertificateAuthorityServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "publicca.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "publicca.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", - GaxProperties.getLibraryVersion(PublicCertificateAuthorityServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", - GaxProperties.getLibraryVersion(PublicCertificateAuthorityServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return PublicCertificateAuthorityServiceStubSettings - .defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected PublicCertificateAuthorityServiceStubSettings(Builder settingsBuilder) - throws IOException { - super(settingsBuilder); - - createExternalAccountKeySettings = settingsBuilder.createExternalAccountKeySettings().build(); - } - - /** Builder for PublicCertificateAuthorityServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createExternalAccountKeySettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - 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(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createExternalAccountKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(createExternalAccountKeySettings); - initDefaults(this); - } - - protected Builder(PublicCertificateAuthorityServiceStubSettings settings) { - super(settings); - - createExternalAccountKeySettings = settings.createExternalAccountKeySettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(createExternalAccountKeySettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createExternalAccountKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createExternalAccountKey. */ - public UnaryCallSettings.Builder - createExternalAccountKeySettings() { - return createExternalAccountKeySettings; - } - - @Override - public PublicCertificateAuthorityServiceStubSettings build() throws IOException { - return new PublicCertificateAuthorityServiceStubSettings(this); - } - } -} diff --git a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityService.java b/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityService.java deleted file mode 100644 index 39fd0b4b6770..000000000000 --- a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockPublicCertificateAuthorityService implements MockGrpcService { - private final MockPublicCertificateAuthorityServiceImpl serviceImpl; - - public MockPublicCertificateAuthorityService() { - serviceImpl = new MockPublicCertificateAuthorityServiceImpl(); - } - - @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/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityServiceImpl.java b/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityServiceImpl.java deleted file mode 100644 index 12280f4f7c24..000000000000 --- a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/MockPublicCertificateAuthorityServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityServiceGrpc.PublicCertificateAuthorityServiceImplBase; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockPublicCertificateAuthorityServiceImpl - extends PublicCertificateAuthorityServiceImplBase { - private List requests; - private Queue responses; - - public MockPublicCertificateAuthorityServiceImpl() { - 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 createExternalAccountKey( - CreateExternalAccountKeyRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ExternalAccountKey) { - requests.add(request); - responseObserver.onNext(((ExternalAccountKey) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateExternalAccountKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ExternalAccountKey.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientHttpJsonTest.java b/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientHttpJsonTest.java deleted file mode 100644 index 876cdd191745..000000000000 --- a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientHttpJsonTest.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.security.publicca.v1beta1.stub.HttpJsonPublicCertificateAuthorityServiceStub; -import com.google.protobuf.ByteString; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class PublicCertificateAuthorityServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static PublicCertificateAuthorityServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonPublicCertificateAuthorityServiceStub.getMethodDescriptors(), - PublicCertificateAuthorityServiceSettings.getDefaultEndpoint()); - PublicCertificateAuthorityServiceSettings settings = - PublicCertificateAuthorityServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - PublicCertificateAuthorityServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = PublicCertificateAuthorityServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createExternalAccountKeyTest() throws Exception { - ExternalAccountKey expectedResponse = - ExternalAccountKey.newBuilder() - .setName( - ExternalAccountKeyName.of("[PROJECT]", "[LOCATION]", "[EXTERNAL_ACCOUNT_KEY]") - .toString()) - .setKeyId("keyId101944282") - .setB64MacKey(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - - ExternalAccountKey actualResponse = client.createExternalAccountKey(parent, externalAccountKey); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createExternalAccountKeyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - client.createExternalAccountKey(parent, externalAccountKey); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExternalAccountKeyTest2() throws Exception { - ExternalAccountKey expectedResponse = - ExternalAccountKey.newBuilder() - .setName( - ExternalAccountKeyName.of("[PROJECT]", "[LOCATION]", "[EXTERNAL_ACCOUNT_KEY]") - .toString()) - .setKeyId("keyId101944282") - .setB64MacKey(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - - ExternalAccountKey actualResponse = client.createExternalAccountKey(parent, externalAccountKey); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createExternalAccountKeyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - client.createExternalAccountKey(parent, externalAccountKey); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientTest.java b/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientTest.java deleted file mode 100644 index 999ed2ca6614..000000000000 --- a/java-publicca/google-cloud-publicca/src/test/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceClientTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -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.protobuf.AbstractMessage; -import com.google.protobuf.ByteString; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class PublicCertificateAuthorityServiceClientTest { - private static MockPublicCertificateAuthorityService mockPublicCertificateAuthorityService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private PublicCertificateAuthorityServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockPublicCertificateAuthorityService = new MockPublicCertificateAuthorityService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockPublicCertificateAuthorityService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - PublicCertificateAuthorityServiceSettings settings = - PublicCertificateAuthorityServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = PublicCertificateAuthorityServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createExternalAccountKeyTest() throws Exception { - ExternalAccountKey expectedResponse = - ExternalAccountKey.newBuilder() - .setName( - ExternalAccountKeyName.of("[PROJECT]", "[LOCATION]", "[EXTERNAL_ACCOUNT_KEY]") - .toString()) - .setKeyId("keyId101944282") - .setB64MacKey(ByteString.EMPTY) - .build(); - mockPublicCertificateAuthorityService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - - ExternalAccountKey actualResponse = client.createExternalAccountKey(parent, externalAccountKey); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPublicCertificateAuthorityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExternalAccountKeyRequest actualRequest = - ((CreateExternalAccountKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(externalAccountKey, actualRequest.getExternalAccountKey()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExternalAccountKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPublicCertificateAuthorityService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - client.createExternalAccountKey(parent, externalAccountKey); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createExternalAccountKeyTest2() throws Exception { - ExternalAccountKey expectedResponse = - ExternalAccountKey.newBuilder() - .setName( - ExternalAccountKeyName.of("[PROJECT]", "[LOCATION]", "[EXTERNAL_ACCOUNT_KEY]") - .toString()) - .setKeyId("keyId101944282") - .setB64MacKey(ByteString.EMPTY) - .build(); - mockPublicCertificateAuthorityService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - - ExternalAccountKey actualResponse = client.createExternalAccountKey(parent, externalAccountKey); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPublicCertificateAuthorityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateExternalAccountKeyRequest actualRequest = - ((CreateExternalAccountKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(externalAccountKey, actualRequest.getExternalAccountKey()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createExternalAccountKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPublicCertificateAuthorityService.addException(exception); - - try { - String parent = "parent-995424086"; - ExternalAccountKey externalAccountKey = ExternalAccountKey.newBuilder().build(); - client.createExternalAccountKey(parent, externalAccountKey); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-publicca/grpc-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceGrpc.java b/java-publicca/grpc-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceGrpc.java deleted file mode 100644 index 66b7115cbd08..000000000000 --- a/java-publicca/grpc-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/PublicCertificateAuthorityServiceGrpc.java +++ /dev/null @@ -1,390 +0,0 @@ -/* - * 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.security.publicca.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Manages the resources required for ACME [external account
- * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
- * the public certificate authority service.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/security/publicca/v1beta1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class PublicCertificateAuthorityServiceGrpc { - - private PublicCertificateAuthorityServiceGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.security.publicca.v1beta1.PublicCertificateAuthorityService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey> - getCreateExternalAccountKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateExternalAccountKey", - requestType = - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.class, - responseType = com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey> - getCreateExternalAccountKeyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey> - getCreateExternalAccountKeyMethod; - if ((getCreateExternalAccountKeyMethod = - PublicCertificateAuthorityServiceGrpc.getCreateExternalAccountKeyMethod) - == null) { - synchronized (PublicCertificateAuthorityServiceGrpc.class) { - if ((getCreateExternalAccountKeyMethod = - PublicCertificateAuthorityServiceGrpc.getCreateExternalAccountKeyMethod) - == null) { - PublicCertificateAuthorityServiceGrpc.getCreateExternalAccountKeyMethod = - getCreateExternalAccountKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateExternalAccountKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.security.publicca.v1beta1 - .CreateExternalAccountKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey - .getDefaultInstance())) - .setSchemaDescriptor( - new PublicCertificateAuthorityServiceMethodDescriptorSupplier( - "CreateExternalAccountKey")) - .build(); - } - } - } - return getCreateExternalAccountKeyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static PublicCertificateAuthorityServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PublicCertificateAuthorityServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceStub(channel, callOptions); - } - }; - return PublicCertificateAuthorityServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static PublicCertificateAuthorityServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PublicCertificateAuthorityServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceBlockingStub(channel, callOptions); - } - }; - return PublicCertificateAuthorityServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PublicCertificateAuthorityServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PublicCertificateAuthorityServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceFutureStub(channel, callOptions); - } - }; - return PublicCertificateAuthorityServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Manages the resources required for ACME [external account
-   * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
-   * the public certificate authority service.
-   * 
- */ - public abstract static class PublicCertificateAuthorityServiceImplBase - implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.
-     * 
- */ - public void createExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateExternalAccountKeyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateExternalAccountKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey>( - this, METHODID_CREATE_EXTERNAL_ACCOUNT_KEY))) - .build(); - } - } - - /** - * - * - *
-   * Manages the resources required for ACME [external account
-   * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
-   * the public certificate authority service.
-   * 
- */ - public static final class PublicCertificateAuthorityServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private PublicCertificateAuthorityServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublicCertificateAuthorityServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.
-     * 
- */ - public void createExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateExternalAccountKeyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Manages the resources required for ACME [external account
-   * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
-   * the public certificate authority service.
-   * 
- */ - public static final class PublicCertificateAuthorityServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private PublicCertificateAuthorityServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublicCertificateAuthorityServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.
-     * 
- */ - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey createExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateExternalAccountKeyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Manages the resources required for ACME [external account
-   * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
-   * the public certificate authority service.
-   * 
- */ - public static final class PublicCertificateAuthorityServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private PublicCertificateAuthorityServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublicCertificateAuthorityServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PublicCertificateAuthorityServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] bound to the project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey> - createExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateExternalAccountKeyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_EXTERNAL_ACCOUNT_KEY = 0; - - 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 PublicCertificateAuthorityServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(PublicCertificateAuthorityServiceImplBase 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_CREATE_EXTERNAL_ACCOUNT_KEY: - serviceImpl.createExternalAccountKey( - (com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey>) - 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 PublicCertificateAuthorityServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PublicCertificateAuthorityServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("PublicCertificateAuthorityService"); - } - } - - private static final class PublicCertificateAuthorityServiceFileDescriptorSupplier - extends PublicCertificateAuthorityServiceBaseDescriptorSupplier { - PublicCertificateAuthorityServiceFileDescriptorSupplier() {} - } - - private static final class PublicCertificateAuthorityServiceMethodDescriptorSupplier - extends PublicCertificateAuthorityServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - PublicCertificateAuthorityServiceMethodDescriptorSupplier(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 (PublicCertificateAuthorityServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor( - new PublicCertificateAuthorityServiceFileDescriptorSupplier()) - .addMethod(getCreateExternalAccountKeyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequest.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequest.java deleted file mode 100644 index 28d53c94a558..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequest.java +++ /dev/null @@ -1,1002 +0,0 @@ -/* - * 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/security/publicca/v1beta1/service.proto - -package com.google.cloud.security.publicca.v1beta1; - -/** - * - * - *
- * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] in a given project.
- * 
- * - * Protobuf type {@code google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest} - */ -public final class CreateExternalAccountKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) - CreateExternalAccountKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateExternalAccountKeyRequest.newBuilder() to construct. - private CreateExternalAccountKeyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateExternalAccountKeyRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateExternalAccountKeyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto - .internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto - .internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.class, - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.Builder - .class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource where this external_account_key will be created.
-   * Format: projects/[project_id]/locations/[location].
-   * At present only the "global" location is supported.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource where this external_account_key will be created.
-   * Format: projects/[project_id]/locations/[location].
-   * At present only the "global" location is supported.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_ACCOUNT_KEY_FIELD_NUMBER = 2; - private com.google.cloud.security.publicca.v1beta1.ExternalAccountKey externalAccountKey_; - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the externalAccountKey field is set. - */ - @java.lang.Override - public boolean hasExternalAccountKey() { - return externalAccountKey_ != null; - } - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The externalAccountKey. - */ - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey getExternalAccountKey() { - return externalAccountKey_ == null - ? com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.getDefaultInstance() - : externalAccountKey_; - } - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder - getExternalAccountKeyOrBuilder() { - return getExternalAccountKey(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (externalAccountKey_ != null) { - output.writeMessage(2, getExternalAccountKey()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (externalAccountKey_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExternalAccountKey()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.security.publicca.v1beta1.CreateExternalAccountKeyRequest)) { - return super.equals(obj); - } - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest other = - (com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasExternalAccountKey() != other.hasExternalAccountKey()) return false; - if (hasExternalAccountKey()) { - if (!getExternalAccountKey().equals(other.getExternalAccountKey())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasExternalAccountKey()) { - hash = (37 * hash) + EXTERNAL_ACCOUNT_KEY_FIELD_NUMBER; - hash = (53 * hash) + getExternalAccountKey().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - 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.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom( - 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.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom( - java.io.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.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseDelimitedFrom( - java.io.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.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.security.publicca.v1beta1.CreateExternalAccountKeyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Creates a new [ExternalAccountKey][google.cloud.security.publicca.v1beta1.ExternalAccountKey] in a given project.
-   * 
- * - * Protobuf type {@code google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto - .internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto - .internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.class, - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (externalAccountKeyBuilder_ == null) { - externalAccountKey_ = null; - } else { - externalAccountKey_ = null; - externalAccountKeyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.security.publicca.v1beta1.ServiceProto - .internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - getDefaultInstanceForType() { - return com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest build() { - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - buildPartial() { - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest result = - new com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest(this); - result.parent_ = parent_; - if (externalAccountKeyBuilder_ == null) { - result.externalAccountKey_ = externalAccountKey_; - } else { - result.externalAccountKey_ = externalAccountKeyBuilder_.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.security.publicca.v1beta1.CreateExternalAccountKeyRequest) { - return mergeFrom( - (com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest other) { - if (other - == com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasExternalAccountKey()) { - mergeExternalAccountKey(other.getExternalAccountKey()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage( - getExternalAccountKeyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource where this external_account_key will be created.
-     * Format: projects/[project_id]/locations/[location].
-     * At present only the "global" location is supported.
-     * 
- * - * - * 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 parent resource where this external_account_key will be created.
-     * Format: projects/[project_id]/locations/[location].
-     * At present only the "global" location is supported.
-     * 
- * - * - * 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 parent resource where this external_account_key will be created.
-     * Format: projects/[project_id]/locations/[location].
-     * At present only the "global" location is supported.
-     * 
- * - * - * 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 parent resource where this external_account_key will be created.
-     * Format: projects/[project_id]/locations/[location].
-     * At present only the "global" location is supported.
-     * 
- * - * - * 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 parent resource where this external_account_key will be created.
-     * Format: projects/[project_id]/locations/[location].
-     * At present only the "global" location is supported.
-     * 
- * - * - * 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.security.publicca.v1beta1.ExternalAccountKey externalAccountKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder> - externalAccountKeyBuilder_; - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the externalAccountKey field is set. - */ - public boolean hasExternalAccountKey() { - return externalAccountKeyBuilder_ != null || externalAccountKey_ != null; - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The externalAccountKey. - */ - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey getExternalAccountKey() { - if (externalAccountKeyBuilder_ == null) { - return externalAccountKey_ == null - ? com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.getDefaultInstance() - : externalAccountKey_; - } else { - return externalAccountKeyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey value) { - if (externalAccountKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalAccountKey_ = value; - onChanged(); - } else { - externalAccountKeyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder builderForValue) { - if (externalAccountKeyBuilder_ == null) { - externalAccountKey_ = builderForValue.build(); - onChanged(); - } else { - externalAccountKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeExternalAccountKey( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey value) { - if (externalAccountKeyBuilder_ == null) { - if (externalAccountKey_ != null) { - externalAccountKey_ = - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.newBuilder( - externalAccountKey_) - .mergeFrom(value) - .buildPartial(); - } else { - externalAccountKey_ = value; - } - onChanged(); - } else { - externalAccountKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearExternalAccountKey() { - if (externalAccountKeyBuilder_ == null) { - externalAccountKey_ = null; - onChanged(); - } else { - externalAccountKey_ = null; - externalAccountKeyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder - getExternalAccountKeyBuilder() { - - onChanged(); - return getExternalAccountKeyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder - getExternalAccountKeyOrBuilder() { - if (externalAccountKeyBuilder_ != null) { - return externalAccountKeyBuilder_.getMessageOrBuilder(); - } else { - return externalAccountKey_ == null - ? com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.getDefaultInstance() - : externalAccountKey_; - } - } - /** - * - * - *
-     * Required. The external account key to create. This field only exists to future-proof
-     * the API. At present, all fields in ExternalAccountKey are output only and
-     * all values are ignored. For the purpose of the
-     * CreateExternalAccountKeyRequest, set it to a default/empty value.
-     * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder> - getExternalAccountKeyFieldBuilder() { - if (externalAccountKeyBuilder_ == null) { - externalAccountKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder>( - getExternalAccountKey(), getParentForChildren(), isClean()); - externalAccountKey_ = null; - } - return externalAccountKeyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.security.publicca.v1beta1.CreateExternalAccountKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) - private static final com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest(); - } - - public static com.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateExternalAccountKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.security.publicca.v1beta1.CreateExternalAccountKeyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequestOrBuilder.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequestOrBuilder.java deleted file mode 100644 index 057580401f8b..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/CreateExternalAccountKeyRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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/security/publicca/v1beta1/service.proto - -package com.google.cloud.security.publicca.v1beta1; - -public interface CreateExternalAccountKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource where this external_account_key will be created.
-   * Format: projects/[project_id]/locations/[location].
-   * At present only the "global" location is supported.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource where this external_account_key will be created.
-   * Format: projects/[project_id]/locations/[location].
-   * At present only the "global" location is supported.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the externalAccountKey field is set. - */ - boolean hasExternalAccountKey(); - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The externalAccountKey. - */ - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey getExternalAccountKey(); - /** - * - * - *
-   * Required. The external account key to create. This field only exists to future-proof
-   * the API. At present, all fields in ExternalAccountKey are output only and
-   * all values are ignored. For the purpose of the
-   * CreateExternalAccountKeyRequest, set it to a default/empty value.
-   * 
- * - * - * .google.cloud.security.publicca.v1beta1.ExternalAccountKey external_account_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder - getExternalAccountKeyOrBuilder(); -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKey.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKey.java deleted file mode 100644 index aabc88ed66b9..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKey.java +++ /dev/null @@ -1,923 +0,0 @@ -/* - * 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/security/publicca/v1beta1/resources.proto - -package com.google.cloud.security.publicca.v1beta1; - -/** - * - * - *
- * A representation of an ExternalAccountKey used for [external account
- * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.
- * 
- * - * Protobuf type {@code google.cloud.security.publicca.v1beta1.ExternalAccountKey} - */ -public final class ExternalAccountKey extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.security.publicca.v1beta1.ExternalAccountKey) - ExternalAccountKeyOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExternalAccountKey.newBuilder() to construct. - private ExternalAccountKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExternalAccountKey() { - name_ = ""; - keyId_ = ""; - b64MacKey_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExternalAccountKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.security.publicca.v1beta1.ResourcesProto - .internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.security.publicca.v1beta1.ResourcesProto - .internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.class, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. Resource name.
-   * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Resource name.
-   * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEY_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object keyId_; - /** - * - * - *
-   * Output only. Key ID.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The keyId. - */ - @java.lang.Override - public java.lang.String getKeyId() { - java.lang.Object ref = keyId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Key ID.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for keyId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeyIdBytes() { - java.lang.Object ref = keyId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int B64_MAC_KEY_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString b64MacKey_; - /** - * - * - *
-   * Output only. Base64-URL-encoded HS256 key.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The b64MacKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getB64MacKey() { - return b64MacKey_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyId_); - } - if (!b64MacKey_.isEmpty()) { - output.writeBytes(3, b64MacKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyId_); - } - if (!b64MacKey_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, b64MacKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = 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.security.publicca.v1beta1.ExternalAccountKey)) { - return super.equals(obj); - } - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey other = - (com.google.cloud.security.publicca.v1beta1.ExternalAccountKey) obj; - - if (!getName().equals(other.getName())) return false; - if (!getKeyId().equals(other.getKeyId())) return false; - if (!getB64MacKey().equals(other.getB64MacKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + KEY_ID_FIELD_NUMBER; - hash = (53 * hash) + getKeyId().hashCode(); - hash = (37 * hash) + B64_MAC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getB64MacKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey 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.security.publicca.v1beta1.ExternalAccountKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - 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.security.publicca.v1beta1.ExternalAccountKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - java.io.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.security.publicca.v1beta1.ExternalAccountKey parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseDelimitedFrom( - java.io.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.security.publicca.v1beta1.ExternalAccountKey parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.security.publicca.v1beta1.ExternalAccountKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of an ExternalAccountKey used for [external account
-   * binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.
-   * 
- * - * Protobuf type {@code google.cloud.security.publicca.v1beta1.ExternalAccountKey} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.security.publicca.v1beta1.ExternalAccountKey) - com.google.cloud.security.publicca.v1beta1.ExternalAccountKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.security.publicca.v1beta1.ResourcesProto - .internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.security.publicca.v1beta1.ResourcesProto - .internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.class, - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.Builder.class); - } - - // Construct using com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - keyId_ = ""; - - b64MacKey_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.security.publicca.v1beta1.ResourcesProto - .internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_descriptor; - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey - getDefaultInstanceForType() { - return com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey build() { - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.security.publicca.v1beta1.ExternalAccountKey buildPartial() { - com.google.cloud.security.publicca.v1beta1.ExternalAccountKey result = - new com.google.cloud.security.publicca.v1beta1.ExternalAccountKey(this); - result.name_ = name_; - result.keyId_ = keyId_; - result.b64MacKey_ = b64MacKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.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.security.publicca.v1beta1.ExternalAccountKey) { - return mergeFrom((com.google.cloud.security.publicca.v1beta1.ExternalAccountKey) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.security.publicca.v1beta1.ExternalAccountKey other) { - if (other - == com.google.cloud.security.publicca.v1beta1.ExternalAccountKey.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getKeyId().isEmpty()) { - keyId_ = other.keyId_; - onChanged(); - } - if (other.getB64MacKey() != com.google.protobuf.ByteString.EMPTY) { - setB64MacKey(other.getB64MacKey()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - keyId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - b64MacKey_ = input.readBytes(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. Resource name.
-     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Resource name.
-     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Resource name.
-     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Resource name.
-     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Resource name.
-     * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object keyId_ = ""; - /** - * - * - *
-     * Output only. Key ID.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The keyId. - */ - public java.lang.String getKeyId() { - java.lang.Object ref = keyId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Key ID.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for keyId. - */ - public com.google.protobuf.ByteString getKeyIdBytes() { - java.lang.Object ref = keyId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Key ID.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The keyId to set. - * @return This builder for chaining. - */ - public Builder setKeyId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - keyId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Key ID.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearKeyId() { - - keyId_ = getDefaultInstance().getKeyId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Key ID.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for keyId to set. - * @return This builder for chaining. - */ - public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - keyId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString b64MacKey_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * Output only. Base64-URL-encoded HS256 key.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The b64MacKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getB64MacKey() { - return b64MacKey_; - } - /** - * - * - *
-     * Output only. Base64-URL-encoded HS256 key.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The b64MacKey to set. - * @return This builder for chaining. - */ - public Builder setB64MacKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - b64MacKey_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Base64-URL-encoded HS256 key.
-     * It is generated by the PublicCertificateAuthorityService
-     * when the ExternalAccountKey is created
-     * 
- * - * bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearB64MacKey() { - - b64MacKey_ = getDefaultInstance().getB64MacKey(); - 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.security.publicca.v1beta1.ExternalAccountKey) - } - - // @@protoc_insertion_point(class_scope:google.cloud.security.publicca.v1beta1.ExternalAccountKey) - private static final com.google.cloud.security.publicca.v1beta1.ExternalAccountKey - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.security.publicca.v1beta1.ExternalAccountKey(); - } - - public static com.google.cloud.security.publicca.v1beta1.ExternalAccountKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExternalAccountKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static 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.security.publicca.v1beta1.ExternalAccountKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyName.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyName.java deleted file mode 100644 index bbf098782889..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyName.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ExternalAccountKeyName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_EXTERNAL_ACCOUNT_KEY = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/externalAccountKeys/{external_account_key}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String externalAccountKey; - - @Deprecated - protected ExternalAccountKeyName() { - project = null; - location = null; - externalAccountKey = null; - } - - private ExternalAccountKeyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - externalAccountKey = Preconditions.checkNotNull(builder.getExternalAccountKey()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getExternalAccountKey() { - return externalAccountKey; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ExternalAccountKeyName of( - String project, String location, String externalAccountKey) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setExternalAccountKey(externalAccountKey) - .build(); - } - - public static String format(String project, String location, String externalAccountKey) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setExternalAccountKey(externalAccountKey) - .build() - .toString(); - } - - public static ExternalAccountKeyName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_EXTERNAL_ACCOUNT_KEY.validatedMatch( - formattedString, "ExternalAccountKeyName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), matchMap.get("location"), matchMap.get("external_account_key")); - } - - 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 (ExternalAccountKeyName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_EXTERNAL_ACCOUNT_KEY.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (externalAccountKey != null) { - fieldMapBuilder.put("external_account_key", externalAccountKey); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_EXTERNAL_ACCOUNT_KEY.instantiate( - "project", project, "location", location, "external_account_key", externalAccountKey); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ExternalAccountKeyName that = ((ExternalAccountKeyName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.externalAccountKey, that.externalAccountKey); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(externalAccountKey); - return h; - } - - /** - * Builder for projects/{project}/locations/{location}/externalAccountKeys/{external_account_key}. - */ - public static class Builder { - private String project; - private String location; - private String externalAccountKey; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getExternalAccountKey() { - return externalAccountKey; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setExternalAccountKey(String externalAccountKey) { - this.externalAccountKey = externalAccountKey; - return this; - } - - private Builder(ExternalAccountKeyName externalAccountKeyName) { - this.project = externalAccountKeyName.project; - this.location = externalAccountKeyName.location; - this.externalAccountKey = externalAccountKeyName.externalAccountKey; - } - - public ExternalAccountKeyName build() { - return new ExternalAccountKeyName(this); - } - } -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyOrBuilder.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyOrBuilder.java deleted file mode 100644 index c92a5bef8992..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ExternalAccountKeyOrBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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/security/publicca/v1beta1/resources.proto - -package com.google.cloud.security.publicca.v1beta1; - -public interface ExternalAccountKeyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.security.publicca.v1beta1.ExternalAccountKey) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Resource name.
-   * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. Resource name.
-   * projects/{project}/locations/{location}/externalAccountKeys/{key_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. Key ID.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The keyId. - */ - java.lang.String getKeyId(); - /** - * - * - *
-   * Output only. Key ID.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * string key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for keyId. - */ - com.google.protobuf.ByteString getKeyIdBytes(); - - /** - * - * - *
-   * Output only. Base64-URL-encoded HS256 key.
-   * It is generated by the PublicCertificateAuthorityService
-   * when the ExternalAccountKey is created
-   * 
- * - * bytes b64_mac_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The b64MacKey. - */ - com.google.protobuf.ByteString getB64MacKey(); -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/LocationName.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/LocationName.java deleted file mode 100644 index ca103b08cecc..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.security.publicca.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ResourcesProto.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ResourcesProto.java deleted file mode 100644 index f79c0a71c022..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ResourcesProto.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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/security/publicca/v1beta1/resources.proto - -package com.google.cloud.security.publicca.v1beta1; - -public final class ResourcesProto { - private ResourcesProto() {} - - 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_security_publicca_v1beta1_ExternalAccountKey_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n6google/cloud/security/publicca/v1beta1" - + "/resources.proto\022&google.cloud.security." - + "publicca.v1beta1\032\037google/api/field_behav" - + "ior.proto\032\031google/api/resource.proto\"\335\001\n" - + "\022ExternalAccountKey\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\023" - + "\n\006key_id\030\002 \001(\tB\003\340A\003\022\030\n\013b64_mac_key\030\003 \001(\014" - + "B\003\340A\003:\204\001\352A\200\001\n*publicca.googleapis.com/Ex" - + "ternalAccountKey\022Rprojects/{project}/loc" - + "ations/{location}/externalAccountKeys/{e" - + "xternal_account_key}B\220\002\n*com.google.clou" - + "d.security.publicca.v1beta1B\016ResourcesPr" - + "otoP\001ZNgoogle.golang.org/genproto/google" - + "apis/cloud/security/publicca/v1beta1;pub" - + "licca\370\001\001\252\002&Google.Cloud.Security.PublicC" - + "A.V1Beta1\312\002&Google\\Cloud\\Security\\Public" - + "CA\\V1beta1\352\002*Google::Cloud::Security::Pu" - + "blicCA::V1beta1b\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_security_publicca_v1beta1_ExternalAccountKey_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_security_publicca_v1beta1_ExternalAccountKey_descriptor, - new java.lang.String[] { - "Name", "KeyId", "B64MacKey", - }); - 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(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ServiceProto.java b/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ServiceProto.java deleted file mode 100644 index c5b07242441b..000000000000 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/src/main/java/com/google/cloud/security/publicca/v1beta1/ServiceProto.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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/security/publicca/v1beta1/service.proto - -package com.google.cloud.security.publicca.v1beta1; - -public final class ServiceProto { - private ServiceProto() {} - - 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_security_publicca_v1beta1_CreateExternalAccountKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_security_publicca_v1beta1_CreateExternalAccountKeyRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/security/publicca/v1beta1" - + "/service.proto\022&google.cloud.security.pu" - + "blicca.v1beta1\032\034google/api/annotations.p" - + "roto\032\027google/api/client.proto\032\037google/ap" - + "i/field_behavior.proto\032\031google/api/resou" - + "rce.proto\0326google/cloud/security/publicc" - + "a/v1beta1/resources.proto\"\304\001\n\037CreateExte" - + "rnalAccountKeyRequest\022B\n\006parent\030\001 \001(\tB2\340" - + "A\002\372A,\022*publicca.googleapis.com/ExternalA" - + "ccountKey\022]\n\024external_account_key\030\002 \001(\0132" - + ":.google.cloud.security.publicca.v1beta1" - + ".ExternalAccountKeyB\003\340A\0022\214\003\n!PublicCerti" - + "ficateAuthorityService\022\231\002\n\030CreateExterna" - + "lAccountKey\022G.google.cloud.security.publ" - + "icca.v1beta1.CreateExternalAccountKeyReq" - + "uest\032:.google.cloud.security.publicca.v1" - + "beta1.ExternalAccountKey\"x\202\323\344\223\002T\"