From 4b66838ead6826a389fc9bb9e596b40a16688a81 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 20 Sep 2025 11:28:03 +0000 Subject: [PATCH 1/2] chore: Update generation configuration at Sat Sep 20 11:27:55 UTC 2025 --- .github/workflows/hermetic_library_generation.yaml | 2 +- generation_config.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 04e4063f52aa..6d1265ec78f1 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -37,7 +37,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.1 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.2 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} diff --git a/generation_config.yaml b/generation_config.yaml index 3a9aa5852f4b..97397826c314 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.62.1 -googleapis_commitish: 9978d435df71bb16ecadd1e4421640748d0bf533 -libraries_bom_version: 26.67.0 +gapic_generator_version: 2.62.2 +googleapis_commitish: 3acfdb6166a7101691cdf812bf8f8a67a2084fde +libraries_bom_version: 26.68.0 # the libraries are ordered with respect to library name, which is # java-{library.library_name} or java-{library.api-shortname} when From c72368e6dec6bdd7401e02a10bf6707f94932c44 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 20 Sep 2025 12:55:16 +0000 Subject: [PATCH 2/2] chore: generate libraries at Sat Sep 20 11:30:18 UTC 2025 --- java-accessapproval/README.md | 10 +- java-accesscontextmanager/README.md | 10 +- java-admanager/README.md | 10 +- java-advisorynotifications/README.md | 10 +- java-aiplatform/README.md | 10 +- .../v1/EndpointServiceClientTest.java | 8 + .../v1beta1/EndpointServiceClientTest.java | 8 + .../google/cloud/aiplatform/v1/Endpoint.java | 97 + .../aiplatform/v1/EndpointOrBuilder.java | 13 + .../cloud/aiplatform/v1/EndpointProto.java | 60 +- .../google/cloud/aiplatform/v1/endpoint.proto | 3 + .../cloud/aiplatform/v1beta1/Endpoint.java | 97 + .../aiplatform/v1beta1/EndpointOrBuilder.java | 13 + .../aiplatform/v1beta1/EndpointProto.java | 51 +- .../cloud/aiplatform/v1beta1/endpoint.proto | 3 + java-alloydb-connectors/README.md | 10 +- java-alloydb/README.md | 10 +- java-analytics-admin/README.md | 10 +- java-analytics-data/README.md | 10 +- java-analyticshub/README.md | 10 +- java-api-gateway/README.md | 10 +- java-apigee-connect/README.md | 10 +- java-apigee-registry/README.md | 10 +- java-apihub/README.md | 10 +- .../google/cloud/apihub/v1/ApiHubClient.java | 561 +- .../cloud/apihub/v1/ApiHubCollectClient.java | 666 + .../apihub/v1/ApiHubCollectSettings.java | 267 + .../cloud/apihub/v1/ApiHubCurateClient.java | 1283 ++ .../cloud/apihub/v1/ApiHubCurateSettings.java | 272 + .../apihub/v1/ApiHubDiscoveryClient.java | 1358 ++ .../apihub/v1/ApiHubDiscoverySettings.java | 281 + .../cloud/apihub/v1/ApiHubPluginClient.java | 2273 +- .../cloud/apihub/v1/ApiHubPluginSettings.java | 252 + .../cloud/apihub/v1/ApiHubSettings.java | 33 + .../cloud/apihub/v1/ProvisioningClient.java | 172 + .../cloud/apihub/v1/ProvisioningSettings.java | 24 + .../cloud/apihub/v1/gapic_metadata.json | 120 + .../google/cloud/apihub/v1/package-info.java | 61 + .../apihub/v1/stub/ApiHubCollectStub.java | 72 + .../v1/stub/ApiHubCollectStubSettings.java | 478 + .../apihub/v1/stub/ApiHubCurateStub.java | 87 + .../v1/stub/ApiHubCurateStubSettings.java | 555 + .../apihub/v1/stub/ApiHubDiscoveryStub.java | 99 + .../v1/stub/ApiHubDiscoveryStubSettings.java | 681 + .../apihub/v1/stub/ApiHubPluginStub.java | 130 + .../v1/stub/ApiHubPluginStubSettings.java | 763 + .../cloud/apihub/v1/stub/ApiHubStub.java | 15 + .../apihub/v1/stub/ApiHubStubSettings.java | 99 +- .../HttpJsonApiHubCollectCallableFactory.java | 101 + .../v1/stub/HttpJsonApiHubCollectStub.java | 388 + .../HttpJsonApiHubCurateCallableFactory.java | 101 + .../v1/stub/HttpJsonApiHubCurateStub.java | 576 + ...ttpJsonApiHubDiscoveryCallableFactory.java | 101 + .../v1/stub/HttpJsonApiHubDiscoveryStub.java | 571 + .../v1/stub/HttpJsonApiHubPluginStub.java | 880 +- .../apihub/v1/stub/HttpJsonApiHubStub.java | 188 + .../v1/stub/HttpJsonProvisioningStub.java | 78 + .../apihub/v1/stub/ProvisioningStub.java | 12 + .../v1/stub/ProvisioningStubSettings.java | 79 +- .../reflect-config.json | 1998 +- .../cloud/apihub/v1/ApiHubClientTest.java | 366 + .../apihub/v1/ApiHubCollectClientTest.java | 303 + .../apihub/v1/ApiHubCurateClientTest.java | 669 + .../apihub/v1/ApiHubDiscoveryClientTest.java | 663 + .../apihub/v1/ApiHubPluginClientTest.java | 1192 + .../apihub/v1/ProvisioningClientTest.java | 95 + .../google/cloud/apihub/v1/APIMetadata.java | 2123 ++ .../cloud/apihub/v1/APIMetadataOrBuilder.java | 249 + .../apihub/v1/ActionExecutionDetail.java | 634 + .../v1/ActionExecutionDetailOrBuilder.java | 52 + .../google/cloud/apihub/v1/ActionType.java | 179 + .../java/com/google/cloud/apihub/v1/Api.java | 1937 +- .../com/google/cloud/apihub/v1/ApiData.java | 852 + .../cloud/apihub/v1/ApiDataOrBuilder.java | 71 + .../cloud/apihub/v1/ApiHubInstance.java | 777 +- .../cloud/apihub/v1/ApiHubResource.java | 132 +- .../apihub/v1/ApiHubResourceOrBuilder.java | 33 +- .../cloud/apihub/v1/ApiHubServiceProto.java | 440 +- .../cloud/apihub/v1/ApiMetadataList.java | 1005 + .../apihub/v1/ApiMetadataListOrBuilder.java | 92 + .../google/cloud/apihub/v1/ApiOperation.java | 717 +- .../apihub/v1/ApiOperationOrBuilder.java | 102 +- .../google/cloud/apihub/v1/ApiOrBuilder.java | 280 + ...ApplicationIntegrationEndpointDetails.java | 863 + ...onIntegrationEndpointDetailsOrBuilder.java | 86 + .../com/google/cloud/apihub/v1/Attribute.java | 23 + .../cloud/apihub/v1/AttributeValues.java | 343 +- .../apihub/v1/AttributeValuesOrBuilder.java | 40 + .../google/cloud/apihub/v1/AuthConfig.java | 5596 +++++ .../cloud/apihub/v1/AuthConfigOrBuilder.java | 217 + .../com/google/cloud/apihub/v1/AuthType.java | 248 + .../apihub/v1/CollectApiDataRequest.java | 1552 ++ .../v1/CollectApiDataRequestOrBuilder.java | 194 + .../apihub/v1/CollectApiDataResponse.java | 434 + .../v1/CollectApiDataResponseOrBuilder.java | 25 + .../cloud/apihub/v1/CollectServiceProto.java | 237 + .../cloud/apihub/v1/CollectionType.java | 183 + .../cloud/apihub/v1/CommonFieldsProto.java | 902 +- .../cloud/apihub/v1/ConfigValueOption.java | 1013 + .../apihub/v1/ConfigValueOptionOrBuilder.java | 104 + .../cloud/apihub/v1/ConfigVariable.java | 5590 +++++ .../apihub/v1/ConfigVariableOrBuilder.java | 388 + .../apihub/v1/ConfigVariableTemplate.java | 2762 +++ .../v1/ConfigVariableTemplateOrBuilder.java | 289 + .../apihub/v1/CreateApiOperationRequest.java | 1254 + .../CreateApiOperationRequestOrBuilder.java | 153 + .../apihub/v1/CreateCurationRequest.java | 1215 + .../v1/CreateCurationRequestOrBuilder.java | 142 + .../v1/CreatePluginInstanceRequest.java | 1236 + .../CreatePluginInstanceRequestOrBuilder.java | 147 + .../cloud/apihub/v1/CreatePluginRequest.java | 1224 + .../v1/CreatePluginRequestOrBuilder.java | 148 + .../cloud/apihub/v1/CreateSpecRequest.java | 49 +- .../apihub/v1/CreateSpecRequestOrBuilder.java | 14 +- .../cloud/apihub/v1/CreateVersionRequest.java | 49 +- .../v1/CreateVersionRequestOrBuilder.java | 14 +- .../cloud/apihub/v1/CurateServiceProto.java | 294 + .../com/google/cloud/apihub/v1/Curation.java | 4375 ++++ .../cloud/apihub/v1/CurationConfig.java | 1706 ++ .../apihub/v1/CurationConfigOrBuilder.java | 101 + .../google/cloud/apihub/v1/CurationName.java | 223 + .../cloud/apihub/v1/CurationOrBuilder.java | 400 + .../google/cloud/apihub/v1/CurationType.java | 179 + .../v1/DeleteApiHubInstanceRequest.java | 667 + .../DeleteApiHubInstanceRequestOrBuilder.java | 60 + .../apihub/v1/DeleteApiOperationRequest.java | 664 + .../DeleteApiOperationRequestOrBuilder.java | 60 + .../apihub/v1/DeleteCurationRequest.java | 655 + .../v1/DeleteCurationRequestOrBuilder.java | 58 + .../v1/DeletePluginInstanceRequest.java | 667 + .../DeletePluginInstanceRequestOrBuilder.java | 60 + .../cloud/apihub/v1/DeletePluginRequest.java | 654 + .../v1/DeletePluginRequestOrBuilder.java | 58 + .../google/cloud/apihub/v1/Dependency.java | 8 +- .../google/cloud/apihub/v1/Deployment.java | 1823 +- .../cloud/apihub/v1/DeploymentMetadata.java | 1607 ++ .../v1/DeploymentMetadataOrBuilder.java | 192 + .../cloud/apihub/v1/DeploymentOrBuilder.java | 272 +- .../DisablePluginInstanceActionRequest.java | 861 + ...ePluginInstanceActionRequestOrBuilder.java | 86 + .../DisablePluginInstanceActionResponse.java | 446 + ...PluginInstanceActionResponseOrBuilder.java | 25 + .../apihub/v1/DiscoveredApiObservation.java | 4166 ++++ .../v1/DiscoveredApiObservationName.java | 240 + .../v1/DiscoveredApiObservationOrBuilder.java | 552 + .../apihub/v1/DiscoveredApiOperation.java | 4379 ++++ .../apihub/v1/DiscoveredApiOperationName.java | 278 + .../v1/DiscoveredApiOperationOrBuilder.java | 435 + .../apihub/v1/DiscoveryServiceProto.java | 196 + .../v1/EnablePluginInstanceActionRequest.java | 861 + ...ePluginInstanceActionRequestOrBuilder.java | 86 + .../EnablePluginInstanceActionResponse.java | 443 + ...PluginInstanceActionResponseOrBuilder.java | 25 + .../com/google/cloud/apihub/v1/Endpoint.java | 894 + .../cloud/apihub/v1/EndpointOrBuilder.java | 76 + .../ExecutePluginInstanceActionRequest.java | 999 + ...ePluginInstanceActionRequestOrBuilder.java | 103 + .../ExecutePluginInstanceActionResponse.java | 446 + ...PluginInstanceActionResponseOrBuilder.java | 25 + .../cloud/apihub/v1/ExecutionStatus.java | 2816 +++ .../apihub/v1/ExecutionStatusOrBuilder.java | 99 + .../google/cloud/apihub/v1/GatewayType.java | 294 + .../cloud/apihub/v1/GetCurationRequest.java | 654 + .../v1/GetCurationRequestOrBuilder.java | 58 + .../GetDiscoveredApiObservationRequest.java | 668 + ...coveredApiObservationRequestOrBuilder.java | 60 + .../v1/GetDiscoveredApiOperationRequest.java | 664 + ...iscoveredApiOperationRequestOrBuilder.java | 60 + .../apihub/v1/GetPluginInstanceRequest.java | 666 + .../v1/GetPluginInstanceRequestOrBuilder.java | 60 + .../v1/GetStyleGuideContentsRequest.java | 8 +- .../cloud/apihub/v1/GetStyleGuideRequest.java | 6 +- .../apihub/v1/GoogleServiceAccountConfig.java | 670 + .../GoogleServiceAccountConfigOrBuilder.java | 62 + .../google/cloud/apihub/v1/HttpOperation.java | 145 +- .../cloud/apihub/v1/HttpOperationDetails.java | 7715 +++++++ .../v1/HttpOperationDetailsOrBuilder.java | 298 + .../apihub/v1/HttpOperationOrBuilder.java | 38 +- .../cloud/apihub/v1/LintSpecRequest.java | 6 +- .../apihub/v1/ListApiOperationsRequest.java | 203 + .../v1/ListApiOperationsRequestOrBuilder.java | 58 + .../apihub/v1/ListApiOperationsResponse.java | 69 - .../ListApiOperationsResponseOrBuilder.java | 15 - .../cloud/apihub/v1/ListApisRequest.java | 287 + .../apihub/v1/ListApisRequestOrBuilder.java | 82 + .../cloud/apihub/v1/ListCurationsRequest.java | 1366 ++ .../v1/ListCurationsRequestOrBuilder.java | 190 + .../apihub/v1/ListCurationsResponse.java | 1155 + .../v1/ListCurationsResponseOrBuilder.java | 110 + .../apihub/v1/ListDependenciesResponse.java | 23 - .../v1/ListDependenciesResponseOrBuilder.java | 5 - .../apihub/v1/ListDeploymentsRequest.java | 294 + .../v1/ListDeploymentsRequestOrBuilder.java | 84 + .../ListDiscoveredApiObservationsRequest.java | 1005 + ...overedApiObservationsRequestOrBuilder.java | 112 + ...ListDiscoveredApiObservationsResponse.java | 1237 + ...veredApiObservationsResponseOrBuilder.java | 122 + .../ListDiscoveredApiOperationsRequest.java | 1000 + ...scoveredApiOperationsRequestOrBuilder.java | 112 + .../ListDiscoveredApiOperationsResponse.java | 1234 + ...coveredApiOperationsResponseOrBuilder.java | 122 + .../apihub/v1/ListExternalApisResponse.java | 46 - .../v1/ListExternalApisResponseOrBuilder.java | 10 - .../apihub/v1/ListPluginInstancesRequest.java | 1392 ++ .../ListPluginInstancesRequestOrBuilder.java | 196 + .../v1/ListPluginInstancesResponse.java | 1167 + .../ListPluginInstancesResponseOrBuilder.java | 110 + .../cloud/apihub/v1/ListPluginsRequest.java | 1325 ++ .../v1/ListPluginsRequestOrBuilder.java | 178 + .../cloud/apihub/v1/ListPluginsResponse.java | 1155 + .../v1/ListPluginsResponseOrBuilder.java | 109 + .../cloud/apihub/v1/ListSpecsRequest.java | 217 + .../apihub/v1/ListSpecsRequestOrBuilder.java | 62 + .../cloud/apihub/v1/ListSpecsResponse.java | 46 +- .../apihub/v1/ListSpecsResponseOrBuilder.java | 10 +- .../cloud/apihub/v1/ListVersionsRequest.java | 210 + .../v1/ListVersionsRequestOrBuilder.java | 60 + .../cloud/apihub/v1/OperationDetails.java | 92 +- .../apihub/v1/OperationDetailsOrBuilder.java | 24 +- .../cloud/apihub/v1/OperationMetadata.java | 8 +- .../apihub/v1/OperationMetadataOrBuilder.java | 2 +- .../java/com/google/cloud/apihub/v1/Path.java | 77 +- .../google/cloud/apihub/v1/PathOrBuilder.java | 22 +- .../com/google/cloud/apihub/v1/Plugin.java | 8583 ++++++- .../cloud/apihub/v1/PluginActionConfig.java | 1398 ++ .../v1/PluginActionConfigOrBuilder.java | 134 + .../cloud/apihub/v1/PluginCategory.java | 110 +- .../cloud/apihub/v1/PluginInstance.java | 3720 +++ .../cloud/apihub/v1/PluginInstanceAction.java | 3629 +++ .../v1/PluginInstanceActionOrBuilder.java | 316 + .../cloud/apihub/v1/PluginInstanceName.java | 258 + .../apihub/v1/PluginInstanceOrBuilder.java | 466 + .../cloud/apihub/v1/PluginOrBuilder.java | 440 +- .../cloud/apihub/v1/PluginServiceProto.java | 730 +- .../apihub/v1/ProvisioningServiceProto.java | 78 +- .../com/google/cloud/apihub/v1/Secret.java | 637 + .../cloud/apihub/v1/SecretOrBuilder.java | 54 + .../cloud/apihub/v1/SourceMetadata.java | 2931 +++ .../apihub/v1/SourceMetadataOrBuilder.java | 215 + .../java/com/google/cloud/apihub/v1/Spec.java | 567 + .../google/cloud/apihub/v1/SpecMetadata.java | 1562 ++ .../apihub/v1/SpecMetadataOrBuilder.java | 183 + .../google/cloud/apihub/v1/SpecOrBuilder.java | 66 + .../apihub/v1/UpdateApiOperationRequest.java | 1111 + .../UpdateApiOperationRequestOrBuilder.java | 124 + .../apihub/v1/UpdateCurationRequest.java | 1088 + .../v1/UpdateCurationRequestOrBuilder.java | 118 + .../v1/UpdatePluginInstanceRequest.java | 1054 + .../UpdatePluginInstanceRequestOrBuilder.java | 109 + .../apihub/v1/UpdateStyleGuideRequest.java | 8 +- .../com/google/cloud/apihub/v1/Version.java | 590 + .../cloud/apihub/v1/VersionMetadata.java | 2768 +++ .../apihub/v1/VersionMetadataOrBuilder.java | 333 + .../cloud/apihub/v1/VersionOrBuilder.java | 71 + .../cloud/apihub/v1/apihub_service.proto | 327 +- .../cloud/apihub/v1/collect_service.proto | 219 + .../cloud/apihub/v1/common_fields.proto | 793 +- .../cloud/apihub/v1/curate_service.proto | 345 + .../cloud/apihub/v1/discovery_service.proto | 178 + .../cloud/apihub/v1/linting_service.proto | 14 +- .../cloud/apihub/v1/plugin_service.proto | 938 +- .../apihub/v1/provisioning_service.proto | 29 + .../AsyncCreateApiOperation.java | 52 + .../SyncCreateApiOperation.java | 48 + ...eApiOperationStringApioperationString.java | 44 + ...perationVersionnameApioperationString.java | 44 + .../AsyncDeleteApiOperation.java | 52 + .../SyncDeleteApiOperation.java | 49 + ...yncDeleteApiOperationApioperationname.java | 43 + .../SyncDeleteApiOperationString.java | 44 + .../AsyncUpdateApiOperation.java | 51 + .../SyncUpdateApiOperation.java | 47 + ...dateApiOperationApioperationFieldmask.java | 43 + .../collectapidata/AsyncCollectApiData.java | 59 + .../AsyncCollectApiDataLRO.java | 60 + .../collectapidata/SyncCollectApiData.java | 55 + ...DataLocationnameCollectiontypeApidata.java | 47 + ...ectApiDataStringCollectiontypeApidata.java | 47 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../collectapidata/SyncCollectApiData.java | 53 + .../getlocation/SyncGetLocation.java | 55 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../createcuration/AsyncCreateCuration.java | 51 + .../createcuration/SyncCreateCuration.java | 48 + ...ateCurationLocationnameCurationString.java | 44 + ...yncCreateCurationStringCurationString.java | 44 + .../deletecuration/AsyncDeleteCuration.java | 49 + .../deletecuration/SyncDeleteCuration.java | 46 + .../SyncDeleteCurationCurationname.java | 42 + .../SyncDeleteCurationString.java | 42 + .../getcuration/AsyncGetCuration.java | 49 + .../getcuration/SyncGetCuration.java | 46 + .../SyncGetCurationCurationname.java | 42 + .../getcuration/SyncGetCurationString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../listcurations/AsyncListCurations.java | 55 + .../AsyncListCurationsPaged.java | 62 + .../listcurations/SyncListCurations.java | 51 + .../SyncListCurationsLocationname.java | 44 + .../SyncListCurationsString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../updatecuration/AsyncUpdateCuration.java | 50 + .../updatecuration/SyncUpdateCuration.java | 47 + .../SyncUpdateCurationCurationFieldmask.java | 43 + .../createcuration/SyncCreateCuration.java | 55 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../AsyncGetDiscoveredApiObservation.java | 53 + .../SyncGetDiscoveredApiObservation.java | 50 + ...servationDiscoveredapiobservationname.java | 45 + ...SyncGetDiscoveredApiObservationString.java | 44 + .../AsyncGetDiscoveredApiOperation.java | 56 + .../SyncGetDiscoveredApiOperation.java | 52 + ...piOperationDiscoveredapioperationname.java | 47 + .../SyncGetDiscoveredApiOperationString.java | 48 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../AsyncListDiscoveredApiObservations.java | 54 + ...yncListDiscoveredApiObservationsPaged.java | 62 + .../SyncListDiscoveredApiObservations.java | 51 + ...DiscoveredApiObservationsLocationname.java | 45 + ...ncListDiscoveredApiObservationsString.java | 45 + .../AsyncListDiscoveredApiOperations.java | 57 + ...AsyncListDiscoveredApiOperationsPaged.java | 65 + .../SyncListDiscoveredApiOperations.java | 54 + ...perationsDiscoveredapiobservationname.java | 48 + ...SyncListDiscoveredApiOperationsString.java | 47 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../SyncGetDiscoveredApiObservation.java | 56 + .../createplugin/AsyncCreatePlugin.java | 51 + .../createplugin/SyncCreatePlugin.java | 48 + ...cCreatePluginLocationnamePluginString.java | 44 + .../SyncCreatePluginStringPluginString.java | 44 + .../AsyncCreatePluginInstance.java | 53 + .../AsyncCreatePluginInstanceLRO.java | 53 + .../SyncCreatePluginInstance.java | 48 + ...nstancePluginnamePlugininstanceString.java | 47 + ...ginInstanceStringPlugininstanceString.java | 47 + .../deleteplugin/AsyncDeletePlugin.java | 49 + .../deleteplugin/AsyncDeletePluginLRO.java | 51 + .../deleteplugin/SyncDeletePlugin.java | 46 + .../SyncDeletePluginPluginname.java | 42 + .../deleteplugin/SyncDeletePluginString.java | 42 + .../AsyncDeletePluginInstance.java | 52 + .../AsyncDeletePluginInstanceLRO.java | 53 + .../SyncDeletePluginInstance.java | 48 + ...eletePluginInstancePlugininstancename.java | 43 + .../SyncDeletePluginInstanceString.java | 43 + .../AsyncDisablePluginInstanceAction.java | 53 + .../AsyncDisablePluginInstanceActionLRO.java | 54 + .../SyncDisablePluginInstanceAction.java | 50 + ...nstanceActionPlugininstancenameString.java | 45 + ...sablePluginInstanceActionStringString.java | 45 + .../AsyncEnablePluginInstanceAction.java | 53 + .../AsyncEnablePluginInstanceActionLRO.java | 54 + .../SyncEnablePluginInstanceAction.java | 50 + ...nstanceActionPlugininstancenameString.java | 45 + ...nablePluginInstanceActionStringString.java | 45 + .../AsyncExecutePluginInstanceAction.java | 54 + .../AsyncExecutePluginInstanceActionLRO.java | 55 + .../SyncExecutePluginInstanceAction.java | 51 + ...ugininstancenameActionexecutiondetail.java | 47 + ...anceActionStringActionexecutiondetail.java | 46 + .../AsyncGetPluginInstance.java | 52 + .../SyncGetPluginInstance.java | 48 + ...ncGetPluginInstancePlugininstancename.java | 43 + .../SyncGetPluginInstanceString.java | 43 + .../AsyncListPluginInstances.java | 55 + .../AsyncListPluginInstancesPaged.java | 63 + .../SyncListPluginInstances.java | 51 + .../SyncListPluginInstancesPluginname.java | 44 + .../SyncListPluginInstancesString.java | 44 + .../listplugins/AsyncListPlugins.java | 54 + .../listplugins/AsyncListPluginsPaged.java | 62 + .../listplugins/SyncListPlugins.java | 51 + .../SyncListPluginsLocationname.java | 44 + .../listplugins/SyncListPluginsString.java | 44 + .../AsyncUpdatePluginInstance.java | 51 + .../SyncUpdatePluginInstance.java | 47 + ...PluginInstancePlugininstanceFieldmask.java | 43 + .../deleteplugin/SyncDeletePlugin.java | 53 + .../AsyncDeleteApiHubInstance.java | 51 + .../AsyncDeleteApiHubInstanceLRO.java | 52 + .../SyncDeleteApiHubInstance.java | 47 + ...eleteApiHubInstanceApihubinstancename.java | 43 + .../SyncDeleteApiHubInstanceString.java | 43 + .../collectapidata/SyncCollectApiData.java | 54 + .../getlocation/SyncGetLocation.java | 56 + .../createcuration/SyncCreateCuration.java | 56 + .../SyncGetDiscoveredApiObservation.java | 56 + .../deleteplugin/SyncDeletePlugin.java | 54 + java-apikeys/README.md | 10 +- java-appengine-admin/README.md | 10 +- java-apphub/README.md | 10 +- java-area120-tables/README.md | 10 +- java-artifact-registry/README.md | 10 +- java-asset/README.md | 10 +- java-assured-workloads/README.md | 10 +- java-automl/README.md | 10 +- java-backupdr/README.md | 10 +- java-bare-metal-solution/README.md | 10 +- java-batch/README.md | 10 +- .../cloud/batch/v1alpha/AllocationPolicy.java | 137 +- .../v1alpha/AllocationPolicyOrBuilder.java | 26 +- .../google/cloud/batch/v1alpha/JobProto.java | 32 +- .../google/cloud/batch/v1alpha/job.proto | 9 +- java-beyondcorp-appconnections/README.md | 10 +- java-beyondcorp-appconnectors/README.md | 10 +- java-beyondcorp-appgateways/README.md | 10 +- .../README.md | 10 +- java-beyondcorp-clientgateways/README.md | 10 +- java-biglake/README.md | 10 +- java-bigquery-data-exchange/README.md | 10 +- java-bigqueryconnection/README.md | 10 +- java-bigquerydatapolicy/README.md | 10 +- java-bigquerydatatransfer/README.md | 10 +- java-bigquerymigration/README.md | 10 +- java-bigqueryreservation/README.md | 10 +- java-billing/README.md | 10 +- java-billingbudgets/README.md | 10 +- java-binary-authorization/README.md | 10 +- java-certificate-manager/README.md | 10 +- java-channel/README.md | 10 +- java-chat/README.md | 10 +- java-chronicle/README.md | 10 +- java-cloudbuild/README.md | 10 +- .../README.md | 10 +- java-cloudcontrolspartner/README.md | 10 +- java-cloudquotas/README.md | 10 +- java-cloudsecuritycompliance/README.md | 10 +- .../v1/ConfigClient.java | 242 +- .../v1/DeploymentClient.java | 79 +- .../v1/package-info.java | 6 +- .../reflect-config.json | 117 - .../v1/ConfigClientHttpJsonTest.java | 14 +- .../v1/ConfigClientTest.java | 10 +- .../v1/DeploymentClientHttpJsonTest.java | 8 - .../v1/DeploymentClientTest.java | 8 - .../v1/ConfigGrpc.java | 306 +- .../v1/DeploymentGrpc.java | 51 +- .../v1/CloudControl.java | 16 +- .../v1/CloudControlCategory.java | 2 +- .../v1/CloudControlDeployment.java | 392 +- .../v1/CloudControlDeploymentOrBuilder.java | 97 +- .../v1/CloudControlDeploymentReference.java | 18 +- ...udControlDeploymentReferenceOrBuilder.java | 4 +- .../v1/CloudControlGroup.java | 2320 -- .../v1/CloudControlGroupDeployment.java | 2362 -- .../CloudControlGroupDeploymentOrBuilder.java | 290 - .../v1/CloudControlGroupOrBuilder.java | 260 - .../v1/CloudControlMetadata.java | 32 +- .../v1/CloudControlMetadataOrBuilder.java | 6 +- .../v1/CloudProvider.java | 2 +- .../v1/CommonProto.java | 317 +- .../cloudsecuritycompliance/v1/Control.java | 3784 ---- .../v1/ControlFamilyOrBuilder.java | 78 - .../v1/ControlOrBuilder.java | 448 - .../v1/CreateCloudControlRequest.java | 4 +- .../v1/CreateFrameworkDeploymentRequest.java | 70 +- ...teFrameworkDeploymentRequestOrBuilder.java | 18 +- .../v1/CreateFrameworkRequest.java | 4 +- .../v1/DeleteCloudControlRequest.java | 4 +- .../v1/DeleteFrameworkDeploymentRequest.java | 28 +- ...teFrameworkDeploymentRequestOrBuilder.java | 8 +- .../v1/DeleteFrameworkRequest.java | 4 +- .../v1/DeploymentProto.java | 201 +- .../v1/DeploymentState.java | 38 +- .../v1/EnforcementMode.java | 2 +- .../v1/FolderCreationConfig.java | 27 +- .../v1/FolderCreationConfigOrBuilder.java | 6 +- .../cloudsecuritycompliance/v1/Framework.java | 4706 ++-- .../v1/FrameworkCategory.java | 2 +- .../v1/FrameworkDeployment.java | 2372 +- .../v1/FrameworkDeploymentOrBuilder.java | 289 +- .../v1/FrameworkDeploymentReference.java | 63 +- ...FrameworkDeploymentReferenceOrBuilder.java | 16 +- .../v1/FrameworkOrBuilder.java | 156 +- .../v1/GetCloudControlDeploymentRequest.java | 14 +- ...loudControlDeploymentRequestOrBuilder.java | 4 +- .../v1/GetCloudControlRequest.java | 4 +- .../v1/GetFrameworkDeploymentRequest.java | 14 +- ...etFrameworkDeploymentRequestOrBuilder.java | 4 +- .../v1/GetFrameworkRequest.java | 12 +- .../v1/GetFrameworkRequestOrBuilder.java | 2 +- .../ListCloudControlDeploymentsRequest.java | 28 +- ...oudControlDeploymentsRequestOrBuilder.java | 8 +- .../ListCloudControlDeploymentsResponse.java | 4 +- .../v1/ListCloudControlsRequest.java | 4 +- .../v1/ListFrameworkDeploymentsRequest.java | 28 +- ...tFrameworkDeploymentsRequestOrBuilder.java | 8 +- .../v1/ListFrameworkDeploymentsResponse.java | 4 +- .../v1/ListFrameworksRequest.java | 11 +- .../v1/ListFrameworksRequestOrBuilder.java | 2 + .../v1/ListFrameworksResponse.java | 75 +- .../v1/ListFrameworksResponseOrBuilder.java | 15 +- .../v1/ProjectCreationConfig.java | 34 +- .../v1/ProjectCreationConfigOrBuilder.java | 8 +- .../v1/RuleActionType.java | 2 +- .../cloudsecuritycompliance/v1/Severity.java | 2 +- .../v1/TargetResourceConfig.java | 51 +- .../v1/TargetResourceConfigOrBuilder.java | 15 +- .../v1/TargetResourceCreationConfig.java | 80 +- ...TargetResourceCreationConfigOrBuilder.java | 18 +- .../v1/TargetResourceType.java | 2 +- .../v1/UpdateCloudControlRequest.java | 4 +- .../v1/UpdateFrameworkRequest.java | 12 +- .../v1/UpdateFrameworkRequestOrBuilder.java | 2 +- .../cloudsecuritycompliance/v1/common.proto | 218 +- .../cloudsecuritycompliance/v1/config.proto | 99 +- .../v1/deployment.proto | 229 +- java-cloudsupport/README.md | 10 +- java-compute/README.md | 10 +- .../cloud/compute/v1/AddressesClient.java | 127 + .../cloud/compute/v1/AddressesSettings.java | 12 + .../compute/v1/GlobalAddressesClient.java | 119 + .../compute/v1/GlobalAddressesSettings.java | 13 + .../compute/v1/InstanceGroupsClient.java | 127 + .../compute/v1/InstanceGroupsSettings.java | 13 + .../cloud/compute/v1/InstancesClient.java | 335 + .../cloud/compute/v1/InstancesSettings.java | 49 + .../v1/RegionInstanceGroupsClient.java | 130 + .../v1/RegionInstanceGroupsSettings.java | 13 + .../compute/v1/ServiceAttachmentsClient.java | 2 + .../compute/v1/TargetInstancesClient.java | 127 + .../compute/v1/TargetInstancesSettings.java | 13 + .../cloud/compute/v1/TargetPoolsClient.java | 127 + .../cloud/compute/v1/TargetPoolsSettings.java | 12 + .../cloud/compute/v1/gapic_metadata.json | 24 + .../cloud/compute/v1/stub/AddressesStub.java | 7 + .../v1/stub/AddressesStubSettings.java | 33 +- .../compute/v1/stub/GlobalAddressesStub.java | 7 + .../v1/stub/GlobalAddressesStubSettings.java | 34 +- .../v1/stub/HttpJsonAddressesStub.java | 74 + .../v1/stub/HttpJsonGlobalAddressesStub.java | 72 + .../v1/stub/HttpJsonInstanceGroupsStub.java | 74 + .../v1/stub/HttpJsonInstancesStub.java | 196 + .../HttpJsonRegionInstanceGroupsStub.java | 75 + .../stub/HttpJsonServiceAttachmentsStub.java | 4 + .../v1/stub/HttpJsonTargetInstancesStub.java | 74 + .../v1/stub/HttpJsonTargetPoolsStub.java | 74 + .../compute/v1/stub/InstanceGroupsStub.java | 7 + .../v1/stub/InstanceGroupsStubSettings.java | 34 +- .../cloud/compute/v1/stub/InstancesStub.java | 24 + .../v1/stub/InstancesStubSettings.java | 149 + .../v1/stub/RegionInstanceGroupsStub.java | 7 + .../RegionInstanceGroupsStubSettings.java | 41 +- .../compute/v1/stub/TargetInstancesStub.java | 7 + .../v1/stub/TargetInstancesStubSettings.java | 34 +- .../compute/v1/stub/TargetPoolsStub.java | 7 + .../v1/stub/TargetPoolsStubSettings.java | 33 +- .../reflect-config.json | 270 + .../cloud/compute/v1/AddressesClientTest.java | 51 + .../compute/v1/GlobalAddressesClientTest.java | 49 + .../compute/v1/InstanceGroupsClientTest.java | 51 + .../cloud/compute/v1/InstancesClientTest.java | 154 + .../compute/v1/NetworkProfilesClientTest.java | 1 + .../v1/RegionInstanceGroupsClientTest.java | 51 + .../cloud/compute/v1/RoutersClientTest.java | 1 + .../compute/v1/TargetInstancesClientTest.java | 51 + .../compute/v1/TargetPoolsClientTest.java | 51 + .../compute/v1/VpnTunnelsClientTest.java | 1 + .../AddNetworkInterfaceInstanceRequest.java | 1601 ++ ...workInterfaceInstanceRequestOrBuilder.java | 194 + .../compute/v1/BackendBucketCdnPolicy.java | 12 +- .../v1/BackendBucketCdnPolicyOrBuilder.java | 4 +- .../compute/v1/BackendServiceCdnPolicy.java | 12 +- .../v1/BackendServiceCdnPolicyOrBuilder.java | 4 +- .../com/google/cloud/compute/v1/Compute.java | 18834 ++++++++-------- ...DeleteNetworkInterfaceInstanceRequest.java | 1479 ++ ...workInterfaceInstanceRequestOrBuilder.java | 179 + .../v1/GetServiceAttachmentRequest.java | 138 + .../GetServiceAttachmentRequestOrBuilder.java | 26 + .../com/google/cloud/compute/v1/Instance.java | 23 + .../cloud/compute/v1/InstanceParams.java | 324 +- .../compute/v1/InstanceParamsOrBuilder.java | 37 + .../compute/v1/InstanceWithNamedPorts.java | 23 + ...oupsOperationalStatusAttachmentStatus.java | 20 +- ...tionalStatusAttachmentStatusOrBuilder.java | 6 +- .../cloud/compute/v1/ManagedInstance.java | 23 + .../cloud/compute/v1/NetworkInterface.java | 417 +- .../compute/v1/NetworkInterfaceOrBuilder.java | 65 + .../cloud/compute/v1/NetworkProfile.java | 356 +- .../compute/v1/NetworkProfileOrBuilder.java | 40 + .../compute/v1/NetworkProfileProfileType.java | 2027 ++ .../NetworkProfileProfileTypeOrBuilder.java | 194 + .../com/google/cloud/compute/v1/Router.java | 316 +- .../cloud/compute/v1/RouterOrBuilder.java | 37 + .../google/cloud/compute/v1/RouterParams.java | 809 + .../compute/v1/RouterParamsOrBuilder.java | 89 + .../google/cloud/compute/v1/Scheduling.java | 179 +- .../cloud/compute/v1/SchedulingOrBuilder.java | 26 + .../compute/v1/SecurityPolicyRuleMatcher.java | 24 +- .../SecurityPolicyRuleMatcherOrBuilder.java | 6 +- .../ServiceAttachmentConnectedEndpoint.java | 322 +- ...eAttachmentConnectedEndpointOrBuilder.java | 54 + .../v1/TestIamPermissionsAddressRequest.java | 1349 ++ ...IamPermissionsAddressRequestOrBuilder.java | 148 + ...estIamPermissionsGlobalAddressRequest.java | 1168 + ...missionsGlobalAddressRequestOrBuilder.java | 122 + ...estIamPermissionsInstanceGroupRequest.java | 1357 ++ ...missionsInstanceGroupRequestOrBuilder.java | 148 + ...PermissionsRegionInstanceGroupRequest.java | 1365 ++ ...nsRegionInstanceGroupRequestOrBuilder.java | 148 + ...stIamPermissionsTargetInstanceRequest.java | 1357 ++ ...issionsTargetInstanceRequestOrBuilder.java | 148 + .../TestIamPermissionsTargetPoolRequest.java | 1353 ++ ...PermissionsTargetPoolRequestOrBuilder.java | 148 + .../cloud/compute/v1/UpcomingMaintenance.java | 46 + .../google/cloud/compute/v1/VpnTunnel.java | 757 +- .../compute/v1/VpnTunnelCipherSuite.java | 869 + .../v1/VpnTunnelCipherSuiteOrBuilder.java | 60 + .../cloud/compute/v1/VpnTunnelOrBuilder.java | 37 + .../compute/v1/VpnTunnelPhase1Algorithms.java | 1292 ++ .../VpnTunnelPhase1AlgorithmsOrBuilder.java | 146 + .../compute/v1/VpnTunnelPhase2Algorithms.java | 1080 + .../VpnTunnelPhase2AlgorithmsOrBuilder.java | 116 + .../google/cloud/compute/v1/compute.proto | 382 +- .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + ...onsStringStringTestpermissionsrequest.java | 47 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../AsyncAddNetworkInterface.java | 54 + .../AsyncAddNetworkInterfaceLRO.java | 54 + .../SyncAddNetworkInterface.java | 50 + ...aceStringStringStringNetworkinterface.java | 48 + .../AsyncDeleteNetworkInterface.java | 53 + .../AsyncDeleteNetworkInterfaceLRO.java | 53 + .../SyncDeleteNetworkInterface.java | 49 + ...workInterfaceStringStringStringString.java | 47 + .../AsyncTestIamPermissions.java | 54 + .../SyncTestIamPermissions.java | 50 + ...ingStringStringTestpermissionsrequest.java | 50 + .../v1/serviceattachments/get/AsyncGet.java | 1 + .../v1/serviceattachments/get/SyncGet.java | 1 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 49 + ...ingStringStringTestpermissionsrequest.java | 49 + java-confidentialcomputing/README.md | 10 +- java-configdelivery/README.md | 10 +- java-connectgateway/README.md | 10 +- java-contact-center-insights/README.md | 10 +- java-container/README.md | 10 +- java-containeranalysis/README.md | 10 +- java-contentwarehouse/README.md | 10 +- java-data-fusion/README.md | 10 +- java-datacatalog/README.md | 10 +- java-dataflow/README.md | 10 +- java-dataform/README.md | 10 +- java-datalabeling/README.md | 10 +- java-datalineage/README.md | 10 +- java-dataplex/README.md | 10 +- java-dataproc-metastore/README.md | 10 +- java-dataproc/README.md | 10 +- java-datastream/README.md | 10 +- java-deploy/README.md | 10 +- java-developerconnect/README.md | 10 +- java-devicestreaming/README.md | 10 +- java-dialogflow-cx/README.md | 10 +- java-dialogflow/README.md | 10 +- java-discoveryengine/README.md | 10 +- java-distributedcloudedge/README.md | 10 +- java-dlp/README.md | 10 +- java-dms/README.md | 10 +- java-document-ai/README.md | 10 +- java-domains/README.md | 10 +- java-edgenetwork/README.md | 10 +- java-enterpriseknowledgegraph/README.md | 10 +- java-errorreporting/README.md | 10 +- java-essential-contacts/README.md | 10 +- java-eventarc-publishing/README.md | 10 +- java-eventarc/README.md | 10 +- .../cloud/eventarc/v1/EventarcClient.java | 36 +- .../v1/stub/HttpJsonEventarcStub.java | 3 + .../v1/EventarcClientHttpJsonTest.java | 29 + .../cloud/eventarc/v1/EventarcClientTest.java | 23 + .../cloud/eventarc/v1/EventarcGrpc.java | 20 +- .../com/google/cloud/eventarc/v1/Channel.java | 391 +- .../cloud/eventarc/v1/ChannelConnection.java | 349 + .../v1/ChannelConnectionOrBuilder.java | 63 + .../eventarc/v1/ChannelConnectionProto.java | 40 +- .../cloud/eventarc/v1/ChannelOrBuilder.java | 75 +- .../cloud/eventarc/v1/ChannelProto.java | 40 +- .../eventarc/v1/CreateEnrollmentRequest.java | 14 +- .../v1/CreateEnrollmentRequestOrBuilder.java | 4 +- .../v1/CreateGoogleApiSourceRequest.java | 14 +- ...CreateGoogleApiSourceRequestOrBuilder.java | 4 +- .../eventarc/v1/CreateMessageBusRequest.java | 14 +- .../v1/CreateMessageBusRequestOrBuilder.java | 4 +- .../eventarc/v1/CreatePipelineRequest.java | 21 +- .../v1/CreatePipelineRequestOrBuilder.java | 6 +- .../google/cloud/eventarc/v1/Enrollment.java | 42 +- .../eventarc/v1/EnrollmentOrBuilder.java | 12 +- .../cloud/eventarc/v1/EnrollmentProto.java | 23 +- .../eventarc/v1/GoogleChannelConfig.java | 363 + .../v1/GoogleChannelConfigOrBuilder.java | 67 + .../eventarc/v1/GoogleChannelConfigProto.java | 58 +- .../cloud/eventarc/v1/HttpEndpoint.java | 14 +- .../eventarc/v1/HttpEndpointOrBuilder.java | 4 +- .../eventarc/v1/ListMessageBusesRequest.java | 14 +- .../v1/ListMessageBusesRequestOrBuilder.java | 4 +- .../google/cloud/eventarc/v1/Pipeline.java | 706 +- .../cloud/eventarc/v1/PipelineOrBuilder.java | 18 +- .../cloud/eventarc/v1/PipelineProto.java | 59 +- .../cloud/eventarc/v1/TriggerProto.java | 6 +- .../google/cloud/eventarc/v1/channel.proto | 14 +- .../eventarc/v1/channel_connection.proto | 3 + .../google/cloud/eventarc/v1/enrollment.proto | 5 +- .../google/cloud/eventarc/v1/eventarc.proto | 15 +- .../eventarc/v1/google_channel_config.proto | 6 + .../google/cloud/eventarc/v1/pipeline.proto | 71 +- .../google/cloud/eventarc/v1/trigger.proto | 6 +- java-filestore/README.md | 10 +- java-financialservices/README.md | 10 +- java-functions/README.md | 10 +- java-gdchardwaremanagement/README.md | 10 +- java-geminidataanalytics/README.md | 10 +- java-gke-backup/README.md | 10 +- java-gke-connect-gateway/README.md | 10 +- java-gke-multi-cloud/README.md | 10 +- java-gkehub/README.md | 10 +- .../cloud/gkehub/v1/MembershipProto.java | 15 +- .../cloud/gkehub/v1/ResourceOptions.java | 245 +- .../gkehub/v1/ResourceOptionsOrBuilder.java | 42 +- .../google/cloud/gkehub/v1/membership.proto | 11 +- .../cloud/gkehub/v1beta1/ConnectAgent.java | 14 +- .../gkehub/v1beta1/ConnectAgentOrBuilder.java | 4 +- .../gkehub/v1beta1/MembershipOuterClass.java | 114 +- .../cloud/gkehub/v1beta1/MembershipState.java | 22 +- .../v1beta1/MembershipStateOrBuilder.java | 8 +- .../cloud/gkehub/v1beta1/ResourceOptions.java | 245 +- .../v1beta1/ResourceOptionsOrBuilder.java | 42 +- .../cloud/gkehub/v1beta1/membership.proto | 11 +- java-grafeas/README.md | 10 +- java-gsuite-addons/README.md | 10 +- java-iam-admin/README.md | 10 +- java-iam/README.md | 10 +- java-iamcredentials/README.md | 10 +- java-iap/README.md | 10 +- java-ids/README.md | 10 +- java-infra-manager/README.md | 10 +- java-iot/README.md | 10 +- .../README.md | 10 +- .../README.md | 10 +- java-kms/README.md | 10 +- java-kmsinventory/README.md | 10 +- java-language/README.md | 10 +- java-licensemanager/README.md | 10 +- java-life-sciences/README.md | 10 +- java-lustre/README.md | 10 +- java-maintenance/README.md | 10 +- java-managed-identities/README.md | 10 +- java-managedkafka/README.md | 10 +- java-maps-addressvalidation/README.md | 10 +- java-maps-area-insights/README.md | 10 +- java-maps-fleetengine-delivery/README.md | 10 +- java-maps-fleetengine/README.md | 10 +- java-maps-mapsplatformdatasets/README.md | 10 +- java-maps-places/README.md | 10 +- java-maps-routeoptimization/README.md | 10 +- java-maps-routing/README.md | 10 +- java-maps-solar/README.md | 10 +- java-marketingplatformadminapi/README.md | 10 +- java-mediatranslation/README.md | 10 +- java-meet/README.md | 10 +- java-memcache/README.md | 10 +- java-migrationcenter/README.md | 10 +- java-modelarmor/README.md | 10 +- java-monitoring-dashboards/README.md | 10 +- java-monitoring-metricsscope/README.md | 10 +- java-monitoring/README.md | 10 +- java-netapp/README.md | 10 +- java-network-management/README.md | 10 +- java-network-security/README.md | 10 +- java-networkconnectivity/README.md | 10 +- java-networkservices/README.md | 10 +- java-notebooks/README.md | 10 +- java-optimization/README.md | 10 +- java-oracledatabase/README.md | 10 +- java-orchestration-airflow/README.md | 10 +- java-orgpolicy/README.md | 10 +- java-os-config/README.md | 10 +- java-os-login/README.md | 10 +- java-parallelstore/README.md | 10 +- java-parametermanager/README.md | 10 +- java-phishingprotection/README.md | 10 +- java-policy-troubleshooter/README.md | 10 +- java-policysimulator/README.md | 10 +- java-private-catalog/README.md | 10 +- java-privilegedaccessmanager/README.md | 10 +- java-profiler/README.md | 10 +- java-publicca/README.md | 10 +- java-rapidmigrationassessment/README.md | 10 +- java-recaptchaenterprise/README.md | 10 +- java-recommendations-ai/README.md | 10 +- java-recommender/README.md | 10 +- java-redis-cluster/README.md | 10 +- java-redis/README.md | 10 +- java-resourcemanager/README.md | 10 +- java-retail/README.md | 10 +- java-run/README.md | 10 +- java-saasservicemgmt/README.md | 10 +- java-scheduler/README.md | 10 +- java-secretmanager/README.md | 10 +- java-securesourcemanager/README.md | 10 +- java-security-private-ca/README.md | 10 +- java-securitycenter-settings/README.md | 10 +- java-securitycenter/README.md | 10 +- java-securitycentermanagement/README.md | 10 +- java-securityposture/README.md | 10 +- java-service-control/README.md | 10 +- java-service-management/README.md | 10 +- java-service-usage/README.md | 10 +- java-servicedirectory/README.md | 10 +- java-servicehealth/README.md | 10 +- java-shell/README.md | 10 +- java-shopping-css/README.md | 10 +- java-shopping-merchant-accounts/README.md | 10 +- java-shopping-merchant-conversions/README.md | 10 +- java-shopping-merchant-datasources/README.md | 10 +- java-shopping-merchant-inventories/README.md | 10 +- java-shopping-merchant-lfp/README.md | 10 +- .../README.md | 10 +- .../README.md | 10 +- java-shopping-merchant-products/README.md | 10 +- java-shopping-merchant-promotions/README.md | 10 +- java-shopping-merchant-quota/README.md | 10 +- java-shopping-merchant-reports/README.md | 10 +- java-shopping-merchant-reviews/README.md | 10 +- java-spanneradapter/README.md | 10 +- java-speech/README.md | 10 +- java-storage-transfer/README.md | 10 +- java-storagebatchoperations/README.md | 10 +- java-storageinsights/README.md | 10 +- java-talent/README.md | 10 +- java-tasks/README.md | 10 +- java-telcoautomation/README.md | 10 +- java-texttospeech/README.md | 10 +- .../reflect-config.json | 36 + .../texttospeech/v1/CustomVoiceParams.java | 14 +- .../v1/CustomVoiceParamsOrBuilder.java | 4 +- .../v1/MultiSpeakerVoiceConfig.java | 1061 + .../v1/MultiSpeakerVoiceConfigOrBuilder.java | 99 + .../v1/MultispeakerPrebuiltVoice.java | 847 + .../MultispeakerPrebuiltVoiceOrBuilder.java | 84 + .../v1/StreamingSynthesisInput.java | 340 +- .../v1/StreamingSynthesisInputOrBuilder.java | 40 + .../texttospeech/v1/TextToSpeechProto.java | 152 +- .../texttospeech/v1/VoiceSelectionParams.java | 340 + .../v1/VoiceSelectionParamsOrBuilder.java | 50 + .../cloud/texttospeech/v1/cloud_tts.proto | 32 + java-tpu/README.md | 10 +- java-trace/README.md | 10 +- java-translate/README.md | 10 +- java-valkey/README.md | 10 +- java-video-intelligence/README.md | 10 +- java-video-live-stream/README.md | 10 +- .../v1/LivestreamServiceClient.java | 587 +- .../v1/LivestreamServiceSettings.java | 60 + .../video/livestream/v1/gapic_metadata.json | 9 + .../v1/stub/GrpcLivestreamServiceStub.java | 128 + .../stub/HttpJsonLivestreamServiceStub.java | 218 + .../v1/stub/LivestreamServiceStub.java | 27 + .../stub/LivestreamServiceStubSettings.java | 242 +- .../reflect-config.json | 261 + .../LivestreamServiceClientHttpJsonTest.java | 307 + .../v1/LivestreamServiceClientTest.java | 281 + .../v1/MockLivestreamServiceImpl.java | 63 + .../livestream/v1/LivestreamServiceGrpc.java | 445 +- .../v1/AutoTranscriptionConfig.java | 1183 + .../v1/AutoTranscriptionConfigOrBuilder.java | 88 + .../cloud/video/livestream/v1/Channel.java | 1917 +- .../video/livestream/v1/ChannelOrBuilder.java | 228 +- .../livestream/v1/CreateAssetRequest.java | 49 +- .../v1/CreateAssetRequestOrBuilder.java | 14 +- .../livestream/v1/CreateChannelRequest.java | 49 +- .../v1/CreateChannelRequestOrBuilder.java | 14 +- .../livestream/v1/CreateClipRequest.java | 56 +- .../v1/CreateClipRequestOrBuilder.java | 16 +- .../v1/CreateDvrSessionRequest.java | 56 +- .../v1/CreateDvrSessionRequestOrBuilder.java | 16 +- .../livestream/v1/CreateEventRequest.java | 49 +- .../v1/CreateEventRequestOrBuilder.java | 14 +- .../livestream/v1/CreateInputRequest.java | 49 +- .../v1/CreateInputRequestOrBuilder.java | 14 +- .../video/livestream/v1/Distribution.java | 2275 ++ .../livestream/v1/DistributionOrBuilder.java | 238 + .../livestream/v1/DistributionStream.java | 1220 + .../v1/DistributionStreamOrBuilder.java | 160 + .../cloud/video/livestream/v1/Encryption.java | 360 +- .../video/livestream/v1/EncryptionUpdate.java | 1068 + .../v1/EncryptionUpdateOrBuilder.java | 98 + .../cloud/video/livestream/v1/Event.java | 1539 +- .../video/livestream/v1/EventOrBuilder.java | 41 + .../cloud/video/livestream/v1/Input.java | 73 +- .../video/livestream/v1/OutputsProto.java | 216 +- .../livestream/v1/PreviewInputRequest.java | 656 + .../v1/PreviewInputRequestOrBuilder.java | 58 + .../livestream/v1/PreviewInputResponse.java | 368 +- .../v1/PreviewInputResponseOrBuilder.java | 82 + .../video/livestream/v1/ResourcesProto.java | 291 +- .../livestream/v1/RtmpPushOutputEndpoint.java | 833 + .../v1/RtmpPushOutputEndpointOrBuilder.java | 80 + .../video/livestream/v1/ServiceProto.java | 443 +- .../livestream/v1/SrtPushOutputEndpoint.java | 979 + .../v1/SrtPushOutputEndpointOrBuilder.java | 100 + .../v1/StartDistributionRequest.java | 1263 ++ .../v1/StartDistributionRequestOrBuilder.java | 174 + .../v1/StopDistributionRequest.java | 1263 ++ .../v1/StopDistributionRequestOrBuilder.java | 174 + .../cloud/video/livestream/v1/TextStream.java | 3279 ++- .../livestream/v1/TextStreamOrBuilder.java | 165 + .../video/livestream/v1/VideoStream.java | 2671 ++- .../livestream/v1/VideoStreamOrBuilder.java | 37 + .../cloud/video/livestream/v1/outputs.proto | 240 +- .../cloud/video/livestream/v1/resources.proto | 115 +- .../cloud/video/livestream/v1/service.proto | 177 +- .../previewinput/AsyncPreviewInput.java | 50 + .../previewinput/SyncPreviewInput.java | 46 + .../SyncPreviewInputInputname.java | 42 + .../previewinput/SyncPreviewInputString.java | 42 + .../AsyncStartDistribution.java | 53 + .../AsyncStartDistributionLRO.java | 54 + .../SyncStartDistribution.java | 50 + ...tartDistributionChannelnameListstring.java | 46 + ...SyncStartDistributionStringListstring.java | 46 + .../AsyncStopDistribution.java | 53 + .../AsyncStopDistributionLRO.java | 54 + .../SyncStopDistribution.java | 50 + ...StopDistributionChannelnameListstring.java | 46 + .../SyncStopDistributionStringListstring.java | 46 + java-video-stitcher/README.md | 10 +- java-video-transcoder/README.md | 10 +- java-vision/README.md | 10 +- java-visionai/README.md | 10 +- java-vmmigration/README.md | 10 +- java-vmwareengine/README.md | 10 +- java-vpcaccess/README.md | 10 +- java-webrisk/README.md | 10 +- java-websecurityscanner/README.md | 10 +- java-workflow-executions/README.md | 10 +- java-workflows/README.md | 10 +- java-workspaceevents/README.md | 10 +- java-workstations/README.md | 10 +- 963 files changed, 231174 insertions(+), 31563 deletions(-) create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectSettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateClient.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateSettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClient.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoverySettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStubSettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStub.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStubSettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStub.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStubSettings.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectCallableFactory.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectStub.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateCallableFactory.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateStub.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryCallableFactory.java create mode 100644 java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryStub.java create mode 100644 java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCollectClientTest.java create mode 100644 java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCurateClientTest.java create mode 100644 java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClientTest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadata.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetail.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetailOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionType.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiData.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiDataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataList.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataListOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetails.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetailsOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfig.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfigOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthType.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectServiceProto.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectionType.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOption.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOptionOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariable.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplate.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplateOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurateServiceProto.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Curation.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfig.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfigOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationName.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationType.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadata.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservation.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservationName.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservationOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiOperation.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiOperationName.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiOperationOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveryServiceProto.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/EnablePluginInstanceActionRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/EnablePluginInstanceActionRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/EnablePluginInstanceActionResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/EnablePluginInstanceActionResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Endpoint.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/EndpointOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutePluginInstanceActionRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutePluginInstanceActionRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutePluginInstanceActionResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutePluginInstanceActionResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutionStatus.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ExecutionStatusOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GatewayType.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetCurationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetCurationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetDiscoveredApiObservationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetDiscoveredApiObservationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetDiscoveredApiOperationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetDiscoveredApiOperationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetPluginInstanceRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GetPluginInstanceRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GoogleServiceAccountConfig.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/GoogleServiceAccountConfigOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/HttpOperationDetails.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/HttpOperationDetailsOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListCurationsRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListCurationsRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListCurationsResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListCurationsResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiObservationsRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiObservationsRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiObservationsResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiObservationsResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiOperationsRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiOperationsRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiOperationsResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListDiscoveredApiOperationsResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginInstancesRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginInstancesRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginInstancesResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginInstancesResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginsRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginsRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginsResponse.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ListPluginsResponseOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginActionConfig.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginActionConfigOrBuilder.java rename java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/RegulatoryControlResponsibilityType.java => java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginCategory.java (51%) create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginInstance.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginInstanceAction.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginInstanceActionOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginInstanceName.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/PluginInstanceOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Secret.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/SecretOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/SourceMetadata.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/SourceMetadataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/SpecMetadata.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/SpecMetadataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdateApiOperationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdateApiOperationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdateCurationRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdateCurationRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdatePluginInstanceRequest.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/UpdatePluginInstanceRequestOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/VersionMetadata.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/VersionMetadataOrBuilder.java create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/proto/google/cloud/apihub/v1/collect_service.proto create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/proto/google/cloud/apihub/v1/curate_service.proto create mode 100644 java-apihub/proto-google-cloud-apihub-v1/src/main/proto/google/cloud/apihub/v1/discovery_service.proto create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/createapioperation/AsyncCreateApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/createapioperation/SyncCreateApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/createapioperation/SyncCreateApiOperationStringApioperationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/createapioperation/SyncCreateApiOperationVersionnameApioperationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/deleteapioperation/AsyncDeleteApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/deleteapioperation/SyncDeleteApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/deleteapioperation/SyncDeleteApiOperationApioperationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/deleteapioperation/SyncDeleteApiOperationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/updateapioperation/AsyncUpdateApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/updateapioperation/SyncUpdateApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihub/updateapioperation/SyncUpdateApiOperationApioperationFieldmask.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/collectapidata/AsyncCollectApiData.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/collectapidata/AsyncCollectApiDataLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/collectapidata/SyncCollectApiData.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/collectapidata/SyncCollectApiDataLocationnameCollectiontypeApidata.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/collectapidata/SyncCollectApiDataStringCollectiontypeApidata.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/create/SyncCreateSetEndpoint.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/getlocation/AsyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/getlocation/SyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/listlocations/AsyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/listlocations/AsyncListLocationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollect/listlocations/SyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollectsettings/collectapidata/SyncCollectApiData.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcollectsettings/getlocation/SyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/create/SyncCreateSetEndpoint.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/createcuration/AsyncCreateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/createcuration/SyncCreateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/createcuration/SyncCreateCurationLocationnameCurationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/createcuration/SyncCreateCurationStringCurationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/deletecuration/AsyncDeleteCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/deletecuration/SyncDeleteCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/deletecuration/SyncDeleteCurationCurationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/deletecuration/SyncDeleteCurationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getcuration/AsyncGetCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getcuration/SyncGetCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getcuration/SyncGetCurationCurationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getcuration/SyncGetCurationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getlocation/AsyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/getlocation/SyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listcurations/AsyncListCurations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listcurations/AsyncListCurationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listcurations/SyncListCurations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listcurations/SyncListCurationsLocationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listcurations/SyncListCurationsString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listlocations/AsyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listlocations/AsyncListLocationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/listlocations/SyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/updatecuration/AsyncUpdateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/updatecuration/SyncUpdateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcurate/updatecuration/SyncUpdateCurationCurationFieldmask.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubcuratesettings/createcuration/SyncCreateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/create/SyncCreateSetEndpoint.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapiobservation/AsyncGetDiscoveredApiObservation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapiobservation/SyncGetDiscoveredApiObservation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapiobservation/SyncGetDiscoveredApiObservationDiscoveredapiobservationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapiobservation/SyncGetDiscoveredApiObservationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapioperation/AsyncGetDiscoveredApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapioperation/SyncGetDiscoveredApiOperation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapioperation/SyncGetDiscoveredApiOperationDiscoveredapioperationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getdiscoveredapioperation/SyncGetDiscoveredApiOperationString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getlocation/AsyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/getlocation/SyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapiobservations/AsyncListDiscoveredApiObservations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapiobservations/AsyncListDiscoveredApiObservationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapiobservations/SyncListDiscoveredApiObservations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapiobservations/SyncListDiscoveredApiObservationsLocationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapiobservations/SyncListDiscoveredApiObservationsString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapioperations/AsyncListDiscoveredApiOperations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapioperations/AsyncListDiscoveredApiOperationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapioperations/SyncListDiscoveredApiOperations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapioperations/SyncListDiscoveredApiOperationsDiscoveredapiobservationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listdiscoveredapioperations/SyncListDiscoveredApiOperationsString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listlocations/AsyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listlocations/AsyncListLocationsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscovery/listlocations/SyncListLocations.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubdiscoverysettings/getdiscoveredapiobservation/SyncGetDiscoveredApiObservation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugin/AsyncCreatePlugin.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugin/SyncCreatePlugin.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugin/SyncCreatePluginLocationnamePluginString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugin/SyncCreatePluginStringPluginString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugininstance/AsyncCreatePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugininstance/AsyncCreatePluginInstanceLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugininstance/SyncCreatePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugininstance/SyncCreatePluginInstancePluginnamePlugininstanceString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/createplugininstance/SyncCreatePluginInstanceStringPlugininstanceString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugin/AsyncDeletePlugin.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugin/AsyncDeletePluginLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugin/SyncDeletePlugin.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugin/SyncDeletePluginPluginname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugin/SyncDeletePluginString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugininstance/AsyncDeletePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugininstance/AsyncDeletePluginInstanceLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugininstance/SyncDeletePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugininstance/SyncDeletePluginInstancePlugininstancename.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/deleteplugininstance/SyncDeletePluginInstanceString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/disableplugininstanceaction/AsyncDisablePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/disableplugininstanceaction/AsyncDisablePluginInstanceActionLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/disableplugininstanceaction/SyncDisablePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/disableplugininstanceaction/SyncDisablePluginInstanceActionPlugininstancenameString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/disableplugininstanceaction/SyncDisablePluginInstanceActionStringString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/enableplugininstanceaction/AsyncEnablePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/enableplugininstanceaction/AsyncEnablePluginInstanceActionLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/enableplugininstanceaction/SyncEnablePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/enableplugininstanceaction/SyncEnablePluginInstanceActionPlugininstancenameString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/enableplugininstanceaction/SyncEnablePluginInstanceActionStringString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/executeplugininstanceaction/AsyncExecutePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/executeplugininstanceaction/AsyncExecutePluginInstanceActionLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/executeplugininstanceaction/SyncExecutePluginInstanceAction.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/executeplugininstanceaction/SyncExecutePluginInstanceActionPlugininstancenameActionexecutiondetail.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/executeplugininstanceaction/SyncExecutePluginInstanceActionStringActionexecutiondetail.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/getplugininstance/AsyncGetPluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/getplugininstance/SyncGetPluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/getplugininstance/SyncGetPluginInstancePlugininstancename.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/getplugininstance/SyncGetPluginInstanceString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugininstances/AsyncListPluginInstances.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugininstances/AsyncListPluginInstancesPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugininstances/SyncListPluginInstances.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugininstances/SyncListPluginInstancesPluginname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugininstances/SyncListPluginInstancesString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugins/AsyncListPlugins.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugins/AsyncListPluginsPaged.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugins/SyncListPlugins.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugins/SyncListPluginsLocationname.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/listplugins/SyncListPluginsString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/updateplugininstance/AsyncUpdatePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/updateplugininstance/SyncUpdatePluginInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubplugin/updateplugininstance/SyncUpdatePluginInstancePlugininstanceFieldmask.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/apihubpluginsettings/deleteplugin/SyncDeletePlugin.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/provisioning/deleteapihubinstance/AsyncDeleteApiHubInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/provisioning/deleteapihubinstance/AsyncDeleteApiHubInstanceLRO.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/provisioning/deleteapihubinstance/SyncDeleteApiHubInstance.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/provisioning/deleteapihubinstance/SyncDeleteApiHubInstanceApihubinstancename.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/provisioning/deleteapihubinstance/SyncDeleteApiHubInstanceString.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/stub/apihubcollectstubsettings/collectapidata/SyncCollectApiData.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/stub/apihubcollectstubsettings/getlocation/SyncGetLocation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/stub/apihubcuratestubsettings/createcuration/SyncCreateCuration.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/stub/apihubdiscoverystubsettings/getdiscoveredapiobservation/SyncGetDiscoveredApiObservation.java create mode 100644 java-apihub/samples/snippets/generated/com/google/cloud/apihub/v1/stub/apihubpluginstubsettings/deleteplugin/SyncDeletePlugin.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/CloudControlGroup.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/CloudControlGroupDeployment.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/CloudControlGroupDeploymentOrBuilder.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/CloudControlGroupOrBuilder.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/Control.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/ControlFamilyOrBuilder.java delete mode 100644 java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/ControlOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNetworkInterfaceInstanceRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNetworkInterfaceInstanceRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkInterfaceInstanceRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkInterfaceInstanceRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkProfileProfileType.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkProfileProfileTypeOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterParams.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterParamsOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsAddressRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsAddressRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsGlobalAddressRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsGlobalAddressRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceGroupRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceGroupRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionInstanceGroupRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionInstanceGroupRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsTargetInstanceRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsTargetInstanceRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsTargetPoolRequest.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsTargetPoolRequestOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelCipherSuite.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelCipherSuiteOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelPhase1Algorithms.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelPhase1AlgorithmsOrBuilder.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelPhase2Algorithms.java create mode 100644 java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelPhase2AlgorithmsOrBuilder.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/addresses/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/globaladdresses/testiampermissions/SyncTestIamPermissionsStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instancegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addnetworkinterface/AsyncAddNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addnetworkinterface/AsyncAddNetworkInterfaceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addnetworkinterface/SyncAddNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/addnetworkinterface/SyncAddNetworkInterfaceStringStringStringNetworkinterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deletenetworkinterface/AsyncDeleteNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deletenetworkinterface/AsyncDeleteNetworkInterfaceLRO.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deletenetworkinterface/SyncDeleteNetworkInterface.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/instances/deletenetworkinterface/SyncDeleteNetworkInterfaceStringStringStringString.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/regioninstancegroups/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetinstances/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-compute/samples/snippets/generated/com/google/cloud/compute/v1/targetpools/testiampermissions/SyncTestIamPermissionsStringStringStringTestpermissionsrequest.java create mode 100644 java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/MultiSpeakerVoiceConfig.java create mode 100644 java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/MultiSpeakerVoiceConfigOrBuilder.java create mode 100644 java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/MultispeakerPrebuiltVoice.java create mode 100644 java-texttospeech/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/MultispeakerPrebuiltVoiceOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/AutoTranscriptionConfig.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/AutoTranscriptionConfigOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/Distribution.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/DistributionOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/DistributionStream.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/DistributionStreamOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/EncryptionUpdate.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/EncryptionUpdateOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/PreviewInputRequest.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/PreviewInputRequestOrBuilder.java rename java-cloudsecuritycompliance/proto-google-cloud-cloudsecuritycompliance-v1/src/main/java/com/google/cloud/cloudsecuritycompliance/v1/ControlFamily.java => java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/PreviewInputResponse.java (58%) create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/PreviewInputResponseOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/RtmpPushOutputEndpoint.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/RtmpPushOutputEndpointOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/SrtPushOutputEndpoint.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/SrtPushOutputEndpointOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/StartDistributionRequest.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/StartDistributionRequestOrBuilder.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/StopDistributionRequest.java create mode 100644 java-video-live-stream/proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/StopDistributionRequestOrBuilder.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/previewinput/AsyncPreviewInput.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/previewinput/SyncPreviewInput.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/previewinput/SyncPreviewInputInputname.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/previewinput/SyncPreviewInputString.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/startdistribution/AsyncStartDistribution.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/startdistribution/AsyncStartDistributionLRO.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/startdistribution/SyncStartDistribution.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/startdistribution/SyncStartDistributionChannelnameListstring.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/startdistribution/SyncStartDistributionStringListstring.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/stopdistribution/AsyncStopDistribution.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/stopdistribution/AsyncStopDistributionLRO.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/stopdistribution/SyncStopDistribution.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/stopdistribution/SyncStopDistributionChannelnameListstring.java create mode 100644 java-video-live-stream/samples/snippets/generated/com/google/cloud/video/livestream/v1/livestreamservice/stopdistribution/SyncStopDistributionStringListstring.java diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md index b054903e3bc0..3fdabe5ecb16 100644 --- a/java-accessapproval/README.md +++ b/java-accessapproval/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-accessapproval - 2.74.0 + 2.75.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-accessapproval:2.74.0' +implementation 'com.google.cloud:google-cloud-accessapproval:2.75.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.74.0" +libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.75.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-accessapproval.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.74.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-accessapproval/2.75.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-accesscontextmanager/README.md b/java-accesscontextmanager/README.md index 722f757e174c..415ea675f1a1 100644 --- a/java-accesscontextmanager/README.md +++ b/java-accesscontextmanager/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-identity-accesscontextmanager - 1.74.0 + 1.75.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-identity-accesscontextmanager:1.74.0' +implementation 'com.google.cloud:google-identity-accesscontextmanager:1.75.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.74.0" +libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.75.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-identity-accesscontextmanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.74.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-identity-accesscontextmanager/1.75.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-admanager/README.md b/java-admanager/README.md index 89f4de525a24..47144ad2ce26 100644 --- a/java-admanager/README.md +++ b/java-admanager/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.api-ads ad-manager - 0.32.0 + 0.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.api-ads:ad-manager:0.32.0' +implementation 'com.google.api-ads:ad-manager:0.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.api-ads" % "ad-manager" % "0.32.0" +libraryDependencies += "com.google.api-ads" % "ad-manager" % "0.33.0" ``` ## Authentication @@ -200,7 +200,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.api-ads/ad-manager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.api-ads/ad-manager/0.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.api-ads/ad-manager/0.33.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-advisorynotifications/README.md b/java-advisorynotifications/README.md index 5b5c33c74310..dad068d7266f 100644 --- a/java-advisorynotifications/README.md +++ b/java-advisorynotifications/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-advisorynotifications - 0.62.0 + 0.63.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-advisorynotifications:0.62.0' +implementation 'com.google.cloud:google-cloud-advisorynotifications:0.63.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-advisorynotifications" % "0.62.0" +libraryDependencies += "com.google.cloud" % "google-cloud-advisorynotifications" % "0.63.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-advisorynotifications.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-advisorynotifications/0.62.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-advisorynotifications/0.63.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md index fc2383a80fc2..42146ae213a9 100644 --- a/java-aiplatform/README.md +++ b/java-aiplatform/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-aiplatform - 3.74.0 + 3.75.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-aiplatform:3.74.0' +implementation 'com.google.cloud:google-cloud-aiplatform:3.75.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.74.0" +libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.75.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.74.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.75.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java index 190ef44c0a35..b2e7da3708f9 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/EndpointServiceClientTest.java @@ -138,6 +138,7 @@ public void createEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -213,6 +214,7 @@ public void createEndpointTest2() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -288,6 +290,7 @@ public void createEndpointTest3() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -366,6 +369,7 @@ public void createEndpointTest4() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -444,6 +448,7 @@ public void getEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -510,6 +515,7 @@ public void getEndpointTest2() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -662,6 +668,7 @@ public void updateEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -729,6 +736,7 @@ public void updateEndpointLongRunningTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java index ad65cbbcc5e4..d447d7645a42 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/EndpointServiceClientTest.java @@ -138,6 +138,7 @@ public void createEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -213,6 +214,7 @@ public void createEndpointTest2() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -288,6 +290,7 @@ public void createEndpointTest3() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -366,6 +369,7 @@ public void createEndpointTest4() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -444,6 +448,7 @@ public void getEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -510,6 +515,7 @@ public void getEndpointTest2() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -662,6 +668,7 @@ public void updateEndpointTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); mockEndpointService.addResponse(expectedResponse); @@ -729,6 +736,7 @@ public void updateEndpointLongRunningTest() throws Exception { .setSatisfiesPzs(true) .setSatisfiesPzi(true) .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) + .setPrivateModelServerEnabled(true) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java index 27bd0b6d94a7..f4027e70b492 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java @@ -1404,6 +1404,25 @@ public boolean hasGenAiAdvancedFeaturesConfig() { : genAiAdvancedFeaturesConfig_; } + public static final int PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER = 30; + private boolean privateModelServerEnabled_ = false; + + /** + * + * + *
+   * If true, the model server will be isolated from the external internet.
+   * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + @java.lang.Override + public boolean getPrivateModelServerEnabled() { + return privateModelServerEnabled_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1479,6 +1498,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(29, getGenAiAdvancedFeaturesConfig()); } + if (privateModelServerEnabled_ != false) { + output.writeBool(30, privateModelServerEnabled_); + } getUnknownFields().writeTo(output); } @@ -1575,6 +1597,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 29, getGenAiAdvancedFeaturesConfig()); } + if (privateModelServerEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, privateModelServerEnabled_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1637,6 +1662,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGenAiAdvancedFeaturesConfig().equals(other.getGenAiAdvancedFeaturesConfig())) return false; } + if (getPrivateModelServerEnabled() != other.getPrivateModelServerEnabled()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1710,6 +1736,8 @@ public int hashCode() { hash = (37 * hash) + GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getGenAiAdvancedFeaturesConfig().hashCode(); } + hash = (37 * hash) + PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateModelServerEnabled()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1948,6 +1976,7 @@ public Builder clear() { genAiAdvancedFeaturesConfigBuilder_.dispose(); genAiAdvancedFeaturesConfigBuilder_ = null; } + privateModelServerEnabled_ = false; return this; } @@ -2080,6 +2109,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Endpoint result) { : genAiAdvancedFeaturesConfigBuilder_.build(); to_bitField0_ |= 0x00000040; } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.privateModelServerEnabled_ = privateModelServerEnabled_; + } result.bitField0_ |= to_bitField0_; } @@ -2227,6 +2259,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Endpoint other) { if (other.hasGenAiAdvancedFeaturesConfig()) { mergeGenAiAdvancedFeaturesConfig(other.getGenAiAdvancedFeaturesConfig()); } + if (other.getPrivateModelServerEnabled() != false) { + setPrivateModelServerEnabled(other.getPrivateModelServerEnabled()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2403,6 +2438,12 @@ public Builder mergeFrom( bitField0_ |= 0x00100000; break; } // case 234 + case 240: + { + privateModelServerEnabled_ = input.readBool(); + bitField0_ |= 0x00200000; + break; + } // case 240 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6115,6 +6156,62 @@ public Builder clearGenAiAdvancedFeaturesConfig() { return genAiAdvancedFeaturesConfigBuilder_; } + private boolean privateModelServerEnabled_; + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + @java.lang.Override + public boolean getPrivateModelServerEnabled() { + return privateModelServerEnabled_; + } + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @param value The privateModelServerEnabled to set. + * @return This builder for chaining. + */ + public Builder setPrivateModelServerEnabled(boolean value) { + + privateModelServerEnabled_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @return This builder for chaining. + */ + public Builder clearPrivateModelServerEnabled() { + bitField0_ = (bitField0_ & ~0x00200000); + privateModelServerEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java index c646c5cba9e1..6aa608c87805 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java @@ -921,4 +921,17 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigOrBuilder getGenAiAdvancedFeaturesConfigOrBuilder(); + + /** + * + * + *
+   * If true, the model server will be isolated from the external internet.
+   * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + boolean getPrivateModelServerEnabled(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java index 33fcd228d899..d3fd21a7fd0f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java @@ -104,7 +104,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ource.proto\0320google/cloud/aiplatform/v1/encryption_spec.proto\032,google/cloud/aipl" + "atform/v1/explanation.proto\032#google/cloud/aiplatform/v1/io.proto\0322google/cloud/a" + "iplatform/v1/machine_resources.proto\0323google/cloud/aiplatform/v1/service_network" - + "ing.proto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\346\013\n" + + "ing.proto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\214\014\n" + "\010Endpoint\022\021\n" + "\004name\030\001 \001(\tB\003\340A\003\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n" @@ -136,21 +136,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "satisfies_pzs\030\033 \001(\010B\003\340A\003\022\032\n\r" + "satisfies_pzi\030\034 \001(\010B\003\340A\003\022e\n" + "\037gen_ai_advanced_features_config\030\035 \001(" - + "\01327.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigB\003\340A\001\0323\n" + + "\01327.google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfigB\003\340A\001\022$\n" + + "\034private_model_server_enabled\030\036 \001(\010\0323\n" + "\021TrafficSplitEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\005:\0028\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\265\001\352A\261\001\n" - + "\"aiplatform.googleapis.com/Endpoint\022cloud.google.com/go/aiplatform/apiv1/aiplatfor" - + "mpb;aiplatformpb\252\002\032Google.Cloud.AIPlatfo" - + "rm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Goo" - + "gle::Cloud::AIPlatform::V1b\006proto3" + + "EndpointProtoP\001Z>cloud.google.com/go/aiplatform/apiv1/aiplatformp" + + "b;aiplatformpb\252\002\032Google.Cloud.AIPlatform" + + ".V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Googl" + + "e::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -264,6 +265,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SatisfiesPzs", "SatisfiesPzi", "GenAiAdvancedFeaturesConfig", + "PrivateModelServerEnabled", }); internal_static_google_cloud_aiplatform_v1_Endpoint_TrafficSplitEntry_descriptor = internal_static_google_cloud_aiplatform_v1_Endpoint_descriptor.getNestedTypes().get(0); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto index 40c5f493ed10..64e129a4c86b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto @@ -183,6 +183,9 @@ message Endpoint { // configured. Currently, only Model Garden models are supported. GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(google.api.field_behavior) = OPTIONAL]; + + // If true, the model server will be isolated from the external internet. + bool private_model_server_enabled = 30; } // A deployment of a Model. Endpoints contain one or more DeployedModels. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java index 2aae2eed682f..5ce672ebf7d4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java @@ -1411,6 +1411,25 @@ public boolean hasGenAiAdvancedFeaturesConfig() { : genAiAdvancedFeaturesConfig_; } + public static final int PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER = 30; + private boolean privateModelServerEnabled_ = false; + + /** + * + * + *
+   * If true, the model server will be isolated from the external internet.
+   * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + @java.lang.Override + public boolean getPrivateModelServerEnabled() { + return privateModelServerEnabled_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1486,6 +1505,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(29, getGenAiAdvancedFeaturesConfig()); } + if (privateModelServerEnabled_ != false) { + output.writeBool(30, privateModelServerEnabled_); + } getUnknownFields().writeTo(output); } @@ -1582,6 +1604,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 29, getGenAiAdvancedFeaturesConfig()); } + if (privateModelServerEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, privateModelServerEnabled_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1645,6 +1670,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGenAiAdvancedFeaturesConfig().equals(other.getGenAiAdvancedFeaturesConfig())) return false; } + if (getPrivateModelServerEnabled() != other.getPrivateModelServerEnabled()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1718,6 +1744,8 @@ public int hashCode() { hash = (37 * hash) + GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getGenAiAdvancedFeaturesConfig().hashCode(); } + hash = (37 * hash) + PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateModelServerEnabled()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1956,6 +1984,7 @@ public Builder clear() { genAiAdvancedFeaturesConfigBuilder_.dispose(); genAiAdvancedFeaturesConfigBuilder_ = null; } + privateModelServerEnabled_ = false; return this; } @@ -2088,6 +2117,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Endpoint result) : genAiAdvancedFeaturesConfigBuilder_.build(); to_bitField0_ |= 0x00000040; } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.privateModelServerEnabled_ = privateModelServerEnabled_; + } result.bitField0_ |= to_bitField0_; } @@ -2235,6 +2267,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Endpoint other) { if (other.hasGenAiAdvancedFeaturesConfig()) { mergeGenAiAdvancedFeaturesConfig(other.getGenAiAdvancedFeaturesConfig()); } + if (other.getPrivateModelServerEnabled() != false) { + setPrivateModelServerEnabled(other.getPrivateModelServerEnabled()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2412,6 +2447,12 @@ public Builder mergeFrom( bitField0_ |= 0x00100000; break; } // case 234 + case 240: + { + privateModelServerEnabled_ = input.readBool(); + bitField0_ |= 0x00200000; + break; + } // case 240 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6131,6 +6172,62 @@ public Builder clearGenAiAdvancedFeaturesConfig() { return genAiAdvancedFeaturesConfigBuilder_; } + private boolean privateModelServerEnabled_; + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + @java.lang.Override + public boolean getPrivateModelServerEnabled() { + return privateModelServerEnabled_; + } + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @param value The privateModelServerEnabled to set. + * @return This builder for chaining. + */ + public Builder setPrivateModelServerEnabled(boolean value) { + + privateModelServerEnabled_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * If true, the model server will be isolated from the external internet.
+     * 
+ * + * bool private_model_server_enabled = 30; + * + * @return This builder for chaining. + */ + public Builder clearPrivateModelServerEnabled() { + bitField0_ = (bitField0_ & ~0x00200000); + privateModelServerEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java index 021636a62e0a..bf9f1007ee2f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java @@ -924,4 +924,17 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigOrBuilder getGenAiAdvancedFeaturesConfigOrBuilder(); + + /** + * + * + *
+   * If true, the model server will be isolated from the external internet.
+   * 
+ * + * bool private_model_server_enabled = 30; + * + * @return The privateModelServerEnabled. + */ + boolean getPrivateModelServerEnabled(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java index e375420d3e59..f0f2d4fd6ac4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java @@ -112,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/cloud/aiplatform/v1beta1/explanation.proto\032(google/cloud/aiplatform/v1beta1" + "/io.proto\0327google/cloud/aiplatform/v1beta1/machine_resources.proto\0328google/cloud" + "/aiplatform/v1beta1/service_networking.p" - + "roto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\216\014\n" + + "roto\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\264\014\n" + "\010Endpoint\022\021\n" + "\004name\030\001 \001(\tB\003\340A\003\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n" @@ -145,21 +145,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "satisfies_pzs\030\033 \001(\010B\003\340A\003\022\032\n\r" + "satisfies_pzi\030\034 \001(\010B\003\340A\003\022j\n" + "\037gen_ai_advanced_features_config\030\035 \001(\0132<.google" - + ".cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigB\003\340A\001\0323\n" + + ".cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfigB\003\340A\001\022$\n" + + "\034private_model_server_enabled\030\036 \001(\010\0323\n" + "\021TrafficSplitEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\005:\0028\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\265\001\352A\261\001\n" - + "\"aiplatform.googleapis.com/Endpoint\022 com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-alloydb-connectors - 0.51.0 + 0.52.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-alloydb-connectors:0.51.0' +implementation 'com.google.cloud:google-cloud-alloydb-connectors:0.52.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-alloydb-connectors" % "0.51.0" +libraryDependencies += "com.google.cloud" % "google-cloud-alloydb-connectors" % "0.52.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb-connectors.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb-connectors/0.51.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb-connectors/0.52.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-alloydb/README.md b/java-alloydb/README.md index c000ab5d97a6..3a2e59c3f196 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-alloydb - 0.62.0 + 0.63.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-alloydb:0.62.0' +implementation 'com.google.cloud:google-cloud-alloydb:0.63.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.62.0" +libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.63.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.62.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.63.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-analytics-admin/README.md b/java-analytics-admin/README.md index bf4856dcb85b..bad8f8019b6b 100644 --- a/java-analytics-admin/README.md +++ b/java-analytics-admin/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.analytics google-analytics-admin - 0.83.0 + 0.84.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.analytics:google-analytics-admin:0.83.0' +implementation 'com.google.analytics:google-analytics-admin:0.84.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.83.0" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.84.0" ``` ## Authentication @@ -200,7 +200,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.analytics/google-analytics-admin.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.83.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.84.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-analytics-data/README.md b/java-analytics-data/README.md index c5913806e127..94f603ea4271 100644 --- a/java-analytics-data/README.md +++ b/java-analytics-data/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.analytics google-analytics-data - 0.84.0 + 0.85.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.analytics:google-analytics-data:0.84.0' +implementation 'com.google.analytics:google-analytics-data:0.85.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.84.0" +libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.85.0" ``` ## Authentication @@ -200,7 +200,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.analytics/google-analytics-data.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-data/0.84.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-data/0.85.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-analyticshub/README.md b/java-analyticshub/README.md index e40929b2d9b9..1bfe25783c96 100644 --- a/java-analyticshub/README.md +++ b/java-analyticshub/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-analyticshub - 0.70.0 + 0.71.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-analyticshub:0.70.0' +implementation 'com.google.cloud:google-cloud-analyticshub:0.71.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-analyticshub" % "0.70.0" +libraryDependencies += "com.google.cloud" % "google-cloud-analyticshub" % "0.71.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-analyticshub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-analyticshub/0.70.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-analyticshub/0.71.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-api-gateway/README.md b/java-api-gateway/README.md index 5fa5b63039f9..5c471a66d505 100644 --- a/java-api-gateway/README.md +++ b/java-api-gateway/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-api-gateway - 2.73.0 + 2.74.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-api-gateway:2.73.0' +implementation 'com.google.cloud:google-cloud-api-gateway:2.74.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-api-gateway" % "2.73.0" +libraryDependencies += "com.google.cloud" % "google-cloud-api-gateway" % "2.74.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-api-gateway.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-api-gateway/2.73.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-api-gateway/2.74.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-apigee-connect/README.md b/java-apigee-connect/README.md index fb56af0cca18..48e10911b175 100644 --- a/java-apigee-connect/README.md +++ b/java-apigee-connect/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apigee-connect - 2.73.0 + 2.74.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apigee-connect:2.73.0' +implementation 'com.google.cloud:google-cloud-apigee-connect:2.74.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apigee-connect" % "2.73.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apigee-connect" % "2.74.0" ``` ## Authentication @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apigee-connect.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-connect/2.73.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-connect/2.74.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-apigee-registry/README.md b/java-apigee-registry/README.md index 85513fc95751..5b3862060707 100644 --- a/java-apigee-registry/README.md +++ b/java-apigee-registry/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apigee-registry - 0.73.0 + 0.74.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apigee-registry:0.73.0' +implementation 'com.google.cloud:google-cloud-apigee-registry:0.74.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.73.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.74.0" ``` ## Authentication @@ -200,7 +200,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apigee-registry.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-registry/0.73.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apigee-registry/0.74.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-apihub/README.md b/java-apihub/README.md index c447c4afd355..1137d3223042 100644 --- a/java-apihub/README.md +++ b/java-apihub/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.67.0 + 26.68.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apihub - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apihub:0.26.0' +implementation 'com.google.cloud:google-cloud-apihub:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apihub" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apihub" % "0.27.0" ``` ## Authentication @@ -200,7 +200,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-apihub.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apihub/0.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-apihub/0.27.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubClient.java index 29c1dfe3c6da..f9db2918d235 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubClient.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubClient.java @@ -129,7 +129,7 @@ * * *

UpdateApi - *

Update an API resource in the API hub. The following fields in the [API][] can be updated: + *

Update an API resource in the API hub. The following fields in the [API][google.cloud.apihub.v1.Api] can be updated: *

    *
  • [display_name][google.cloud.apihub.v1.Api.display_name] *
  • [description][google.cloud.apihub.v1.Api.description] @@ -139,6 +139,7 @@ *
  • [team][google.cloud.apihub.v1.Api.team] *
  • [business_unit][google.cloud.apihub.v1.Api.business_unit] *
  • [maturity_level][google.cloud.apihub.v1.Api.maturity_level] + *
  • [api_style][google.cloud.apihub.v1.Api.api_style] *
  • [attributes][google.cloud.apihub.v1.Api.attributes] *
*

The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to specify the fields being updated. @@ -411,6 +412,25 @@ * * * + *

CreateApiOperation + *

Create an apiOperation in an API version. An apiOperation can be created only if the version has no apiOperations which were created by parsing a spec. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createApiOperation(CreateApiOperationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createApiOperation(VersionName parent, ApiOperation apiOperation, String apiOperationId) + *

  • createApiOperation(String parent, ApiOperation apiOperation, String apiOperationId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createApiOperationCallable() + *

+ * + * + * *

GetApiOperation *

Get details about a particular operation in API version. * @@ -450,6 +470,53 @@ * * * + *

UpdateApiOperation + *

Update an operation in an API version. The following fields in the [ApiOperation resource][google.cloud.apihub.v1.ApiOperation] can be updated: + *

    + *
  • [details.description][ApiOperation.details.description] + *
  • [details.documentation][ApiOperation.details.documentation] + *
  • [details.http_operation.path][ApiOperation.details.http_operation.path.path] + *
  • [details.http_operation.method][ApiOperation.details.http_operation.method] + *
  • [details.deprecated][ApiOperation.details.deprecated] + *
  • [attributes][google.cloud.apihub.v1.ApiOperation.attributes] + *
+ *

The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be used to specify the fields being updated. + *

An operation can be updated only if the operation was created via [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation was created by parsing the spec, then it can be edited by updating the spec. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateApiOperation(UpdateApiOperationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateApiOperation(ApiOperation apiOperation, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateApiOperationCallable() + *

+ * + * + * + *

DeleteApiOperation + *

Delete an operation in an API version and we can delete only the operations created via create API. If the operation was created by parsing the spec, then it can be deleted by editing or deleting the spec. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteApiOperation(DeleteApiOperationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteApiOperation(ApiOperationName name) + *

  • deleteApiOperation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteApiOperationCallable() + *

+ * + * + * *

GetDefinition *

Get details about a definition in an API version. * @@ -539,8 +606,11 @@ *

  • [slo][google.cloud.apihub.v1.Deployment.slo] *
  • [environment][google.cloud.apihub.v1.Deployment.environment] *
  • [attributes][google.cloud.apihub.v1.Deployment.attributes] - * - *

    The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used to specify the fields being updated. + *

  • [source_project] [google.cloud.apihub.v1.Deployment.source_project] + *
  • [source_environment] [google.cloud.apihub.v1.Deployment.source_environment] + *
  • [management_url][google.cloud.apihub.v1.Deployment.management_url] + *
  • [source_uri][google.cloud.apihub.v1.Deployment.source_uri] The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used to specify the fields being updated. + * * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    *
      @@ -1339,7 +1409,8 @@ public final UnaryCallable listApisCallable() // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update an API resource in the API hub. The following fields in the [API][] can be updated: + * Update an API resource in the API hub. The following fields in the + * [API][google.cloud.apihub.v1.Api] can be updated: * *
        *
      • [display_name][google.cloud.apihub.v1.Api.display_name] @@ -1350,6 +1421,7 @@ public final UnaryCallable listApisCallable() *
      • [team][google.cloud.apihub.v1.Api.team] *
      • [business_unit][google.cloud.apihub.v1.Api.business_unit] *
      • [maturity_level][google.cloud.apihub.v1.Api.maturity_level] + *
      • [api_style][google.cloud.apihub.v1.Api.api_style] *
      • [attributes][google.cloud.apihub.v1.Api.attributes] *
      * @@ -1388,7 +1460,8 @@ public final Api updateApi(Api api, FieldMask updateMask) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update an API resource in the API hub. The following fields in the [API][] can be updated: + * Update an API resource in the API hub. The following fields in the + * [API][google.cloud.apihub.v1.Api] can be updated: * *
        *
      • [display_name][google.cloud.apihub.v1.Api.display_name] @@ -1399,6 +1472,7 @@ public final Api updateApi(Api api, FieldMask updateMask) { *
      • [team][google.cloud.apihub.v1.Api.team] *
      • [business_unit][google.cloud.apihub.v1.Api.business_unit] *
      • [maturity_level][google.cloud.apihub.v1.Api.maturity_level] + *
      • [api_style][google.cloud.apihub.v1.Api.api_style] *
      • [attributes][google.cloud.apihub.v1.Api.attributes] *
      * @@ -1435,7 +1509,8 @@ public final Api updateApi(UpdateApiRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Update an API resource in the API hub. The following fields in the [API][] can be updated: + * Update an API resource in the API hub. The following fields in the + * [API][google.cloud.apihub.v1.Api] can be updated: * *
        *
      • [display_name][google.cloud.apihub.v1.Api.display_name] @@ -1446,6 +1521,7 @@ public final Api updateApi(UpdateApiRequest request) { *
      • [team][google.cloud.apihub.v1.Api.team] *
      • [business_unit][google.cloud.apihub.v1.Api.business_unit] *
      • [maturity_level][google.cloud.apihub.v1.Api.maturity_level] + *
      • [api_style][google.cloud.apihub.v1.Api.api_style] *
      • [attributes][google.cloud.apihub.v1.Api.attributes] *
      * @@ -1625,7 +1701,9 @@ public final UnaryCallable deleteApiCallable() { * id is already used by another version in the API resource. *
    • If not provided, a system generated id will be used. *
    - *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, its length is + * limited to 700 characters and valid characters are /[a-z][A-Z][0-9]-_/. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Version createVersion(ApiName parent, Version version, String versionId) { @@ -1668,7 +1746,9 @@ public final Version createVersion(ApiName parent, Version version, String versi * id is already used by another version in the API resource. *

  • If not provided, a system generated id will be used. * - *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, its length is + * limited to 700 characters and valid characters are /[a-z][A-Z][0-9]-_/. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Version createVersion(String parent, Version version, String versionId) { @@ -2313,7 +2393,9 @@ public final UnaryCallable deleteVersionCallable() * id is already used by another spec in the API resource. *

  • If not provided, a system generated id will be used. * - *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, its + * length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Spec createSpec(VersionName parent, Spec spec, String specId) { @@ -2370,7 +2452,9 @@ public final Spec createSpec(VersionName parent, Spec spec, String specId) { * id is already used by another spec in the API resource. *

  • If not provided, a system generated id will be used. * - *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, its + * length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Spec createSpec(String parent, Spec spec, String specId) { @@ -3124,6 +3208,162 @@ public final UnaryCallable deleteSpecCallable() { return stub.deleteSpecCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an apiOperation in an API version. An apiOperation can be created only if the version + * has no apiOperations which were created by parsing a spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   VersionName parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]");
    +   *   ApiOperation apiOperation = ApiOperation.newBuilder().build();
    +   *   String apiOperationId = "apiOperationId-2124555672";
    +   *   ApiOperation response = apiHubClient.createApiOperation(parent, apiOperation, apiOperationId);
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource for the operation resource. Format: + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}` + * @param apiOperation Required. The operation resource to create. + * @param apiOperationId Optional. The ID to use for the operation resource, which will become the + * final component of the operation's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another operation resource in the API hub. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`, + * its length is limited to 700 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiOperation createApiOperation( + VersionName parent, ApiOperation apiOperation, String apiOperationId) { + CreateApiOperationRequest request = + CreateApiOperationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApiOperation(apiOperation) + .setApiOperationId(apiOperationId) + .build(); + return createApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an apiOperation in an API version. An apiOperation can be created only if the version + * has no apiOperations which were created by parsing a spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   String parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString();
    +   *   ApiOperation apiOperation = ApiOperation.newBuilder().build();
    +   *   String apiOperationId = "apiOperationId-2124555672";
    +   *   ApiOperation response = apiHubClient.createApiOperation(parent, apiOperation, apiOperationId);
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource for the operation resource. Format: + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}` + * @param apiOperation Required. The operation resource to create. + * @param apiOperationId Optional. The ID to use for the operation resource, which will become the + * final component of the operation's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another operation resource in the API hub. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-500 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`, + * its length is limited to 700 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiOperation createApiOperation( + String parent, ApiOperation apiOperation, String apiOperationId) { + CreateApiOperationRequest request = + CreateApiOperationRequest.newBuilder() + .setParent(parent) + .setApiOperation(apiOperation) + .setApiOperationId(apiOperationId) + .build(); + return createApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an apiOperation in an API version. An apiOperation can be created only if the version + * has no apiOperations which were created by parsing a spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   CreateApiOperationRequest request =
    +   *       CreateApiOperationRequest.newBuilder()
    +   *           .setParent(VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
    +   *           .setApiOperationId("apiOperationId-2124555672")
    +   *           .setApiOperation(ApiOperation.newBuilder().build())
    +   *           .build();
    +   *   ApiOperation response = apiHubClient.createApiOperation(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 ApiOperation createApiOperation(CreateApiOperationRequest request) { + return createApiOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an apiOperation in an API version. An apiOperation can be created only if the version + * has no apiOperations which were created by parsing a spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   CreateApiOperationRequest request =
    +   *       CreateApiOperationRequest.newBuilder()
    +   *           .setParent(VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString())
    +   *           .setApiOperationId("apiOperationId-2124555672")
    +   *           .setApiOperation(ApiOperation.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubClient.createApiOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   ApiOperation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createApiOperationCallable() { + return stub.createApiOperationCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get details about a particular operation in API version. @@ -3412,6 +3652,280 @@ public final ListApiOperationsPagedResponse listApiOperations(ListApiOperationsR return stub.listApiOperationsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an operation in an API version. The following fields in the [ApiOperation + * resource][google.cloud.apihub.v1.ApiOperation] can be updated: + * + *
      + *
    • [details.description][ApiOperation.details.description] + *
    • [details.documentation][ApiOperation.details.documentation] + *
    • [details.http_operation.path][ApiOperation.details.http_operation.path.path] + *
    • [details.http_operation.method][ApiOperation.details.http_operation.method] + *
    • [details.deprecated][ApiOperation.details.deprecated] + *
    • [attributes][google.cloud.apihub.v1.ApiOperation.attributes] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    An operation can be updated only if the operation was created via + * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation + * was created by parsing the spec, then it can be edited by updating the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   ApiOperation apiOperation = ApiOperation.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   ApiOperation response = apiHubClient.updateApiOperation(apiOperation, updateMask);
    +   * }
    +   * }
    + * + * @param apiOperation Required. The apiOperation resource to update. + *

    The operation resource's `name` field is used to identify the operation resource to + * update. Format: + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` + * @param updateMask Required. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApiOperation updateApiOperation(ApiOperation apiOperation, FieldMask updateMask) { + UpdateApiOperationRequest request = + UpdateApiOperationRequest.newBuilder() + .setApiOperation(apiOperation) + .setUpdateMask(updateMask) + .build(); + return updateApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an operation in an API version. The following fields in the [ApiOperation + * resource][google.cloud.apihub.v1.ApiOperation] can be updated: + * + *

      + *
    • [details.description][ApiOperation.details.description] + *
    • [details.documentation][ApiOperation.details.documentation] + *
    • [details.http_operation.path][ApiOperation.details.http_operation.path.path] + *
    • [details.http_operation.method][ApiOperation.details.http_operation.method] + *
    • [details.deprecated][ApiOperation.details.deprecated] + *
    • [attributes][google.cloud.apihub.v1.ApiOperation.attributes] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    An operation can be updated only if the operation was created via + * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation + * was created by parsing the spec, then it can be edited by updating the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   UpdateApiOperationRequest request =
    +   *       UpdateApiOperationRequest.newBuilder()
    +   *           .setApiOperation(ApiOperation.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiOperation response = apiHubClient.updateApiOperation(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 ApiOperation updateApiOperation(UpdateApiOperationRequest request) { + return updateApiOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an operation in an API version. The following fields in the [ApiOperation + * resource][google.cloud.apihub.v1.ApiOperation] can be updated: + * + *
      + *
    • [details.description][ApiOperation.details.description] + *
    • [details.documentation][ApiOperation.details.documentation] + *
    • [details.http_operation.path][ApiOperation.details.http_operation.path.path] + *
    • [details.http_operation.method][ApiOperation.details.http_operation.method] + *
    • [details.deprecated][ApiOperation.details.deprecated] + *
    • [attributes][google.cloud.apihub.v1.ApiOperation.attributes] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    An operation can be updated only if the operation was created via + * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. If the operation + * was created by parsing the spec, then it can be edited by updating the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   UpdateApiOperationRequest request =
    +   *       UpdateApiOperationRequest.newBuilder()
    +   *           .setApiOperation(ApiOperation.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubClient.updateApiOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   ApiOperation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateApiOperationCallable() { + return stub.updateApiOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an operation in an API version and we can delete only the operations created via create + * API. If the operation was created by parsing the spec, then it can be deleted by editing or + * deleting the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   ApiOperationName name =
    +   *       ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]");
    +   *   apiHubClient.deleteApiOperation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the operation resource to delete. Format: + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiOperation(ApiOperationName name) { + DeleteApiOperationRequest request = + DeleteApiOperationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an operation in an API version and we can delete only the operations created via create + * API. If the operation was created by parsing the spec, then it can be deleted by editing or + * deleting the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   String name =
    +   *       ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
    +   *           .toString();
    +   *   apiHubClient.deleteApiOperation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the operation resource to delete. Format: + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteApiOperation(String name) { + DeleteApiOperationRequest request = + DeleteApiOperationRequest.newBuilder().setName(name).build(); + deleteApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an operation in an API version and we can delete only the operations created via create + * API. If the operation was created by parsing the spec, then it can be deleted by editing or + * deleting the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   DeleteApiOperationRequest request =
    +   *       DeleteApiOperationRequest.newBuilder()
    +   *           .setName(
    +   *               ApiOperationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   apiHubClient.deleteApiOperation(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 deleteApiOperation(DeleteApiOperationRequest request) { + deleteApiOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an operation in an API version and we can delete only the operations created via create + * API. If the operation was created by parsing the spec, then it can be deleted by editing or + * deleting the spec. + * + *

    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 (ApiHubClient apiHubClient = ApiHubClient.create()) {
    +   *   DeleteApiOperationRequest request =
    +   *       DeleteApiOperationRequest.newBuilder()
    +   *           .setName(
    +   *               ApiOperationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future = apiHubClient.deleteApiOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deleteApiOperationCallable() { + return stub.deleteApiOperationCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get details about a definition in an API version. @@ -3973,11 +4487,14 @@ public final ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest *
  • [slo][google.cloud.apihub.v1.Deployment.slo] *
  • [environment][google.cloud.apihub.v1.Deployment.environment] *
  • [attributes][google.cloud.apihub.v1.Deployment.attributes] + *
  • [source_project] [google.cloud.apihub.v1.Deployment.source_project] + *
  • [source_environment] [google.cloud.apihub.v1.Deployment.source_environment] + *
  • [management_url][google.cloud.apihub.v1.Deployment.management_url] + *
  • [source_uri][google.cloud.apihub.v1.Deployment.source_uri] The + * [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used + * to specify the fields being updated. * * - *

    The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used - * to specify the fields being updated. - * *

    Sample code: * *

    {@code
    @@ -4023,11 +4540,14 @@ public final Deployment updateDeployment(Deployment deployment, FieldMask update
        *   
  • [slo][google.cloud.apihub.v1.Deployment.slo] *
  • [environment][google.cloud.apihub.v1.Deployment.environment] *
  • [attributes][google.cloud.apihub.v1.Deployment.attributes] + *
  • [source_project] [google.cloud.apihub.v1.Deployment.source_project] + *
  • [source_environment] [google.cloud.apihub.v1.Deployment.source_environment] + *
  • [management_url][google.cloud.apihub.v1.Deployment.management_url] + *
  • [source_uri][google.cloud.apihub.v1.Deployment.source_uri] The + * [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used + * to specify the fields being updated. * * - *

    The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used - * to specify the fields being updated. - * *

    Sample code: * *

    {@code
    @@ -4068,11 +4588,14 @@ public final Deployment updateDeployment(UpdateDeploymentRequest request) {
        *   
  • [slo][google.cloud.apihub.v1.Deployment.slo] *
  • [environment][google.cloud.apihub.v1.Deployment.environment] *
  • [attributes][google.cloud.apihub.v1.Deployment.attributes] + *
  • [source_project] [google.cloud.apihub.v1.Deployment.source_project] + *
  • [source_environment] [google.cloud.apihub.v1.Deployment.source_environment] + *
  • [management_url][google.cloud.apihub.v1.Deployment.management_url] + *
  • [source_uri][google.cloud.apihub.v1.Deployment.source_uri] The + * [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used + * to specify the fields being updated. * * - *

    The [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] should be used - * to specify the fields being updated. - * *

    Sample code: * *

    {@code
    diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java
    new file mode 100644
    index 000000000000..c64fe27243bd
    --- /dev/null
    +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectClient.java
    @@ -0,0 +1,666 @@
    +/*
    + * Copyright 2025 Google LLC
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      https://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT 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.apihub.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.httpjson.longrunning.OperationsClient;
    +import com.google.api.gax.longrunning.OperationFuture;
    +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.OperationCallable;
    +import com.google.api.gax.rpc.PageContext;
    +import com.google.api.gax.rpc.UnaryCallable;
    +import com.google.cloud.apihub.v1.stub.ApiHubCollectStub;
    +import com.google.cloud.apihub.v1.stub.ApiHubCollectStubSettings;
    +import com.google.cloud.location.GetLocationRequest;
    +import com.google.cloud.location.ListLocationsRequest;
    +import com.google.cloud.location.ListLocationsResponse;
    +import com.google.cloud.location.Location;
    +import com.google.common.util.concurrent.MoreExecutors;
    +import com.google.longrunning.Operation;
    +import java.io.IOException;
    +import java.util.List;
    +import java.util.concurrent.TimeUnit;
    +import javax.annotation.Generated;
    +
    +// AUTO-GENERATED DOCUMENTATION AND CLASS.
    +/**
    + * Service Description: This service exposes methods used for collecting various types of data from
    + * different first party and third party sources and push it to Hub's collect layer.
    + *
    + * 

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    + *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    + *   Location response = apiHubCollectClient.getLocation(request);
    + * }
    + * }
    + * + *

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

    CollectApiData

    Collect API data from a source and push it to Hub's collect layer.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • collectApiDataAsync(CollectApiDataRequest request) + *

    + *

    Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

    + *
      + *
    • collectApiDataAsync(LocationName location, CollectionType collectionType, ApiData apiData) + *

    • collectApiDataAsync(String location, CollectionType collectionType, ApiData apiData) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • collectApiDataOperationCallable() + *

    • collectApiDataCallable() + *

    + *

    ListLocations

    Lists information about the supported locations for this service.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listLocations(ListLocationsRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listLocationsPagedCallable() + *

    • listLocationsCallable() + *

    + *

    GetLocation

    Gets information about a location.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getLocation(GetLocationRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getLocationCallable() + *

    + *
    + * + *

    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 ApiHubCollectSettings 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
    + * ApiHubCollectSettings apiHubCollectSettings =
    + *     ApiHubCollectSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create(apiHubCollectSettings);
    + * }
    + * + *

    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
    + * ApiHubCollectSettings apiHubCollectSettings =
    + *     ApiHubCollectSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create(apiHubCollectSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ApiHubCollectClient implements BackgroundResource { + private final ApiHubCollectSettings settings; + private final ApiHubCollectStub stub; + private final OperationsClient httpJsonOperationsClient; + + /** Constructs an instance of ApiHubCollectClient with default settings. */ + public static final ApiHubCollectClient create() throws IOException { + return create(ApiHubCollectSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ApiHubCollectClient, 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 ApiHubCollectClient create(ApiHubCollectSettings settings) + throws IOException { + return new ApiHubCollectClient(settings); + } + + /** + * Constructs an instance of ApiHubCollectClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ApiHubCollectSettings). + */ + public static final ApiHubCollectClient create(ApiHubCollectStub stub) { + return new ApiHubCollectClient(stub); + } + + /** + * Constructs an instance of ApiHubCollectClient, 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 ApiHubCollectClient(ApiHubCollectSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ApiHubCollectStubSettings) settings.getStubSettings()).createStub(); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ApiHubCollectClient(ApiHubCollectStub stub) { + this.settings = null; + this.stub = stub; + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ApiHubCollectSettings getSettings() { + return settings; + } + + public ApiHubCollectStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Collect API data from a source and push it to Hub's collect layer. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   LocationName location = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   CollectionType collectionType = CollectionType.forNumber(0);
    +   *   ApiData apiData = ApiData.newBuilder().build();
    +   *   CollectApiDataResponse response =
    +   *       apiHubCollectClient.collectApiDataAsync(location, collectionType, apiData).get();
    +   * }
    +   * }
    + * + * @param location Required. The regional location of the API hub instance and its resources. + * Format: `projects/{project}/locations/{location}` + * @param collectionType Required. The type of collection. Applies to all entries in + * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data]. + * @param apiData Required. The API data to be collected. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture collectApiDataAsync( + LocationName location, CollectionType collectionType, ApiData apiData) { + CollectApiDataRequest request = + CollectApiDataRequest.newBuilder() + .setLocation(location == null ? null : location.toString()) + .setCollectionType(collectionType) + .setApiData(apiData) + .build(); + return collectApiDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Collect API data from a source and push it to Hub's collect layer. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   String location = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    +   *   CollectionType collectionType = CollectionType.forNumber(0);
    +   *   ApiData apiData = ApiData.newBuilder().build();
    +   *   CollectApiDataResponse response =
    +   *       apiHubCollectClient.collectApiDataAsync(location, collectionType, apiData).get();
    +   * }
    +   * }
    + * + * @param location Required. The regional location of the API hub instance and its resources. + * Format: `projects/{project}/locations/{location}` + * @param collectionType Required. The type of collection. Applies to all entries in + * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data]. + * @param apiData Required. The API data to be collected. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture collectApiDataAsync( + String location, CollectionType collectionType, ApiData apiData) { + CollectApiDataRequest request = + CollectApiDataRequest.newBuilder() + .setLocation(location) + .setCollectionType(collectionType) + .setApiData(apiData) + .build(); + return collectApiDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Collect API data from a source and push it to Hub's collect layer. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   CollectApiDataRequest request =
    +   *       CollectApiDataRequest.newBuilder()
    +   *           .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setCollectionType(CollectionType.forNumber(0))
    +   *           .setPluginInstance(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .setApiData(ApiData.newBuilder().build())
    +   *           .build();
    +   *   CollectApiDataResponse response = apiHubCollectClient.collectApiDataAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture collectApiDataAsync( + CollectApiDataRequest request) { + return collectApiDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Collect API data from a source and push it to Hub's collect layer. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   CollectApiDataRequest request =
    +   *       CollectApiDataRequest.newBuilder()
    +   *           .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setCollectionType(CollectionType.forNumber(0))
    +   *           .setPluginInstance(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .setApiData(ApiData.newBuilder().build())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubCollectClient.collectApiDataOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   CollectApiDataResponse response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + collectApiDataOperationCallable() { + return stub.collectApiDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Collect API data from a source and push it to Hub's collect layer. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   CollectApiDataRequest request =
    +   *       CollectApiDataRequest.newBuilder()
    +   *           .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setCollectionType(CollectionType.forNumber(0))
    +   *           .setPluginInstance(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .setApiData(ApiData.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubCollectClient.collectApiDataCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable collectApiDataCallable() { + return stub.collectApiDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Location element : apiHubCollectClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubCollectClient.listLocationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Location element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListLocationsResponse response = apiHubCollectClient.listLocationsCallable().call(request);
    +   *     for (Location element : response.getLocationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   Location response = apiHubCollectClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   ApiFuture future = apiHubCollectClient.getLocationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Location response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectSettings.java new file mode 100644 index 000000000000..31db14d5f1f9 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCollectSettings.java @@ -0,0 +1,267 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.OperationCallSettings; +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.apihub.v1.stub.ApiHubCollectStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +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 ApiHubCollectClient}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getLocation: + * + *

    {@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
    + * ApiHubCollectSettings.Builder apiHubCollectSettingsBuilder = ApiHubCollectSettings.newBuilder();
    + * apiHubCollectSettingsBuilder
    + *     .getLocationSettings()
    + *     .setRetrySettings(
    + *         apiHubCollectSettingsBuilder
    + *             .getLocationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubCollectSettings apiHubCollectSettings = apiHubCollectSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + * + *

    To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for collectApiData: + * + *

    {@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
    + * ApiHubCollectSettings.Builder apiHubCollectSettingsBuilder = ApiHubCollectSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * apiHubCollectSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class ApiHubCollectSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to collectApiData. */ + public UnaryCallSettings collectApiDataSettings() { + return ((ApiHubCollectStubSettings) getStubSettings()).collectApiDataSettings(); + } + + /** Returns the object with the settings used for calls to collectApiData. */ + public OperationCallSettings + collectApiDataOperationSettings() { + return ((ApiHubCollectStubSettings) getStubSettings()).collectApiDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ApiHubCollectStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ApiHubCollectStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ApiHubCollectSettings create(ApiHubCollectStubSettings stub) + throws IOException { + return new ApiHubCollectSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ApiHubCollectStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ApiHubCollectStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ApiHubCollectStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ApiHubCollectStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ApiHubCollectStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ApiHubCollectStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiHubCollectStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubCollectSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ApiHubCollectSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ApiHubCollectStubSettings.newBuilder(clientContext)); + } + + protected Builder(ApiHubCollectSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ApiHubCollectStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ApiHubCollectStubSettings.newBuilder()); + } + + public ApiHubCollectStubSettings.Builder getStubSettingsBuilder() { + return ((ApiHubCollectStubSettings.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 collectApiData. */ + public UnaryCallSettings.Builder collectApiDataSettings() { + return getStubSettingsBuilder().collectApiDataSettings(); + } + + /** Returns the builder for the settings used for calls to collectApiData. */ + public OperationCallSettings.Builder< + CollectApiDataRequest, CollectApiDataResponse, OperationMetadata> + collectApiDataOperationSettings() { + return getStubSettingsBuilder().collectApiDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ApiHubCollectSettings build() throws IOException { + return new ApiHubCollectSettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateClient.java new file mode 100644 index 000000000000..b36ceefc2f2d --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateClient.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.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.apihub.v1.stub.ApiHubCurateStub; +import com.google.cloud.apihub.v1.stub.ApiHubCurateStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +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: This service is used for managing curations for processing API data consumed + * from collect layer. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    + *   Curation curation = Curation.newBuilder().build();
    + *   String curationId = "curationId1428017328";
    + *   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
    + * }
    + * }
    + * + *

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

    CreateCuration

    Create a curation resource in the API hub. Once a curation resource is created, plugin instances can start using it.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • createCuration(CreateCurationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • createCuration(LocationName parent, Curation curation, String curationId) + *

    • createCuration(String parent, Curation curation, String curationId) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • createCurationCallable() + *

    + *

    GetCuration

    Get curation resource details.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getCuration(GetCurationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • getCuration(CurationName name) + *

    • getCuration(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getCurationCallable() + *

    + *

    ListCurations

    List curation resources in the API hub.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listCurations(ListCurationsRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • listCurations(LocationName parent) + *

    • listCurations(String parent) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listCurationsPagedCallable() + *

    • listCurationsCallable() + *

    + *

    UpdateCuration

    Update a curation resource in the API hub. The following fields in the [curation][google.cloud.apihub.v1.Curation] can be updated: + *

      + *
    • [display_name][google.cloud.apihub.v1.Curation.display_name] + *
    • [description][google.cloud.apihub.v1.Curation.description] + *
    + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to specify the fields being updated.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • updateCuration(UpdateCurationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • updateCuration(Curation curation, FieldMask updateMask) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • updateCurationCallable() + *

    + *

    DeleteCuration

    Delete a curation resource in the API hub. A curation can only be deleted if it's not being used by any plugin instance.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • deleteCuration(DeleteCurationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • deleteCuration(CurationName name) + *

    • deleteCuration(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • deleteCurationCallable() + *

    + *

    ListLocations

    Lists information about the supported locations for this service.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listLocations(ListLocationsRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listLocationsPagedCallable() + *

    • listLocationsCallable() + *

    + *

    GetLocation

    Gets information about a location.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getLocation(GetLocationRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getLocationCallable() + *

    + *
    + * + *

    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 ApiHubCurateSettings 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
    + * ApiHubCurateSettings apiHubCurateSettings =
    + *     ApiHubCurateSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
    + * }
    + * + *

    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
    + * ApiHubCurateSettings apiHubCurateSettings =
    + *     ApiHubCurateSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create(apiHubCurateSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ApiHubCurateClient implements BackgroundResource { + private final ApiHubCurateSettings settings; + private final ApiHubCurateStub stub; + + /** Constructs an instance of ApiHubCurateClient with default settings. */ + public static final ApiHubCurateClient create() throws IOException { + return create(ApiHubCurateSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ApiHubCurateClient, 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 ApiHubCurateClient create(ApiHubCurateSettings settings) throws IOException { + return new ApiHubCurateClient(settings); + } + + /** + * Constructs an instance of ApiHubCurateClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ApiHubCurateSettings). + */ + public static final ApiHubCurateClient create(ApiHubCurateStub stub) { + return new ApiHubCurateClient(stub); + } + + /** + * Constructs an instance of ApiHubCurateClient, 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 ApiHubCurateClient(ApiHubCurateSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ApiHubCurateStubSettings) settings.getStubSettings()).createStub(); + } + + protected ApiHubCurateClient(ApiHubCurateStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ApiHubCurateSettings getSettings() { + return settings; + } + + public ApiHubCurateStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a curation resource in the API hub. Once a curation resource is created, plugin + * instances can start using it. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   Curation curation = Curation.newBuilder().build();
    +   *   String curationId = "curationId1428017328";
    +   *   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource for the curation resource. Format: + * `projects/{project}/locations/{location}` + * @param curation Required. The curation resource to create. + * @param curationId Optional. The ID to use for the curation resource, which will become the + * final component of the curations's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * ID is already used by another curation resource in the API hub. + *
    • If not provided, a system generated ID will be used. + *
    + *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Curation createCuration(LocationName parent, Curation curation, String curationId) { + CreateCurationRequest request = + CreateCurationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCuration(curation) + .setCurationId(curationId) + .build(); + return createCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a curation resource in the API hub. Once a curation resource is created, plugin + * instances can start using it. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    +   *   Curation curation = Curation.newBuilder().build();
    +   *   String curationId = "curationId1428017328";
    +   *   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource for the curation resource. Format: + * `projects/{project}/locations/{location}` + * @param curation Required. The curation resource to create. + * @param curationId Optional. The ID to use for the curation resource, which will become the + * final component of the curations's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * ID is already used by another curation resource in the API hub. + *
    • If not provided, a system generated ID will be used. + *
    + *

    This value should be 4-500 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Curation createCuration(String parent, Curation curation, String curationId) { + CreateCurationRequest request = + CreateCurationRequest.newBuilder() + .setParent(parent) + .setCuration(curation) + .setCurationId(curationId) + .build(); + return createCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a curation resource in the API hub. Once a curation resource is created, plugin + * instances can start using it. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   CreateCurationRequest request =
    +   *       CreateCurationRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setCurationId("curationId1428017328")
    +   *           .setCuration(Curation.newBuilder().build())
    +   *           .build();
    +   *   Curation response = apiHubCurateClient.createCuration(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 Curation createCuration(CreateCurationRequest request) { + return createCurationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a curation resource in the API hub. Once a curation resource is created, plugin + * instances can start using it. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   CreateCurationRequest request =
    +   *       CreateCurationRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setCurationId("curationId1428017328")
    +   *           .setCuration(Curation.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future = apiHubCurateClient.createCurationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Curation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createCurationCallable() { + return stub.createCurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get curation resource details. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
    +   *   Curation response = apiHubCurateClient.getCuration(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the curation resource to retrieve. Format: + * `projects/{project}/locations/{location}/curations/{curation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Curation getCuration(CurationName name) { + GetCurationRequest request = + GetCurationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get curation resource details. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
    +   *   Curation response = apiHubCurateClient.getCuration(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the curation resource to retrieve. Format: + * `projects/{project}/locations/{location}/curations/{curation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Curation getCuration(String name) { + GetCurationRequest request = GetCurationRequest.newBuilder().setName(name).build(); + return getCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get curation resource details. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   GetCurationRequest request =
    +   *       GetCurationRequest.newBuilder()
    +   *           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
    +   *           .build();
    +   *   Curation response = apiHubCurateClient.getCuration(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 Curation getCuration(GetCurationRequest request) { + return getCurationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get curation resource details. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   GetCurationRequest request =
    +   *       GetCurationRequest.newBuilder()
    +   *           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
    +   *           .build();
    +   *   ApiFuture future = apiHubCurateClient.getCurationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Curation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getCurationCallable() { + return stub.getCurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List curation resources in the API hub. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of curation resources. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCurationsPagedResponse listCurations(LocationName parent) { + ListCurationsRequest request = + ListCurationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCurations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List curation resources in the API hub. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    +   *   for (Curation element : apiHubCurateClient.listCurations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of curation resources. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCurationsPagedResponse listCurations(String parent) { + ListCurationsRequest request = ListCurationsRequest.newBuilder().setParent(parent).build(); + return listCurations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List curation resources in the API hub. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListCurationsRequest request =
    +   *       ListCurationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Curation element : apiHubCurateClient.listCurations(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 ListCurationsPagedResponse listCurations(ListCurationsRequest request) { + return listCurationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List curation resources in the API hub. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListCurationsRequest request =
    +   *       ListCurationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubCurateClient.listCurationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Curation element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listCurationsPagedCallable() { + return stub.listCurationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List curation resources in the API hub. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListCurationsRequest request =
    +   *       ListCurationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListCurationsResponse response = apiHubCurateClient.listCurationsCallable().call(request);
    +   *     for (Curation element : response.getCurationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listCurationsCallable() { + return stub.listCurationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a curation resource in the API hub. The following fields in the + * [curation][google.cloud.apihub.v1.Curation] can be updated: + * + *
      + *
    • [display_name][google.cloud.apihub.v1.Curation.display_name] + *
    • [description][google.cloud.apihub.v1.Curation.description] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to + * specify the fields being updated. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   Curation curation = Curation.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   Curation response = apiHubCurateClient.updateCuration(curation, updateMask);
    +   * }
    +   * }
    + * + * @param curation Required. The curation resource to update. + *

    The curation resource's `name` field is used to identify the curation resource to + * update. Format: `projects/{project}/locations/{location}/curations/{curation}` + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Curation updateCuration(Curation curation, FieldMask updateMask) { + UpdateCurationRequest request = + UpdateCurationRequest.newBuilder().setCuration(curation).setUpdateMask(updateMask).build(); + return updateCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a curation resource in the API hub. The following fields in the + * [curation][google.cloud.apihub.v1.Curation] can be updated: + * + *

      + *
    • [display_name][google.cloud.apihub.v1.Curation.display_name] + *
    • [description][google.cloud.apihub.v1.Curation.description] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to + * specify the fields being updated. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   UpdateCurationRequest request =
    +   *       UpdateCurationRequest.newBuilder()
    +   *           .setCuration(Curation.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   Curation response = apiHubCurateClient.updateCuration(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 Curation updateCuration(UpdateCurationRequest request) { + return updateCurationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a curation resource in the API hub. The following fields in the + * [curation][google.cloud.apihub.v1.Curation] can be updated: + * + *
      + *
    • [display_name][google.cloud.apihub.v1.Curation.display_name] + *
    • [description][google.cloud.apihub.v1.Curation.description] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdateApiRequest.update_mask] should be used to + * specify the fields being updated. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   UpdateCurationRequest request =
    +   *       UpdateCurationRequest.newBuilder()
    +   *           .setCuration(Curation.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future = apiHubCurateClient.updateCurationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Curation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateCurationCallable() { + return stub.updateCurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a curation resource in the API hub. A curation can only be deleted if it's not being + * used by any plugin instance. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]");
    +   *   apiHubCurateClient.deleteCuration(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the curation resource to delete. Format: + * `projects/{project}/locations/{location}/curations/{curation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCuration(CurationName name) { + DeleteCurationRequest request = + DeleteCurationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a curation resource in the API hub. A curation can only be deleted if it's not being + * used by any plugin instance. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   String name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString();
    +   *   apiHubCurateClient.deleteCuration(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the curation resource to delete. Format: + * `projects/{project}/locations/{location}/curations/{curation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCuration(String name) { + DeleteCurationRequest request = DeleteCurationRequest.newBuilder().setName(name).build(); + deleteCuration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a curation resource in the API hub. A curation can only be deleted if it's not being + * used by any plugin instance. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   DeleteCurationRequest request =
    +   *       DeleteCurationRequest.newBuilder()
    +   *           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
    +   *           .build();
    +   *   apiHubCurateClient.deleteCuration(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 deleteCuration(DeleteCurationRequest request) { + deleteCurationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a curation resource in the API hub. A curation can only be deleted if it's not being + * used by any plugin instance. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   DeleteCurationRequest request =
    +   *       DeleteCurationRequest.newBuilder()
    +   *           .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString())
    +   *           .build();
    +   *   ApiFuture future = apiHubCurateClient.deleteCurationCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deleteCurationCallable() { + return stub.deleteCurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Location element : apiHubCurateClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubCurateClient.listLocationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Location element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListLocationsResponse response = apiHubCurateClient.listLocationsCallable().call(request);
    +   *     for (Location element : response.getLocationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   Location response = apiHubCurateClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   ApiFuture future = apiHubCurateClient.getLocationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Location response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListCurationsPagedResponse + extends AbstractPagedListResponse< + ListCurationsRequest, + ListCurationsResponse, + Curation, + ListCurationsPage, + ListCurationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCurationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCurationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCurationsPagedResponse(ListCurationsPage page) { + super(page, ListCurationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCurationsPage + extends AbstractPage< + ListCurationsRequest, ListCurationsResponse, Curation, ListCurationsPage> { + + private ListCurationsPage( + PageContext context, + ListCurationsResponse response) { + super(context, response); + } + + private static ListCurationsPage createEmptyPage() { + return new ListCurationsPage(null, null); + } + + @Override + protected ListCurationsPage createPage( + PageContext context, + ListCurationsResponse response) { + return new ListCurationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCurationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCurationsRequest, + ListCurationsResponse, + Curation, + ListCurationsPage, + ListCurationsFixedSizeCollection> { + + private ListCurationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCurationsFixedSizeCollection createEmptyCollection() { + return new ListCurationsFixedSizeCollection(null, 0); + } + + @Override + protected ListCurationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCurationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateSettings.java new file mode 100644 index 000000000000..0c73e3605cad --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubCurateSettings.java @@ -0,0 +1,272 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListCurationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.apihub.v1.stub.ApiHubCurateStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 ApiHubCurateClient}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createCuration: + * + *

    {@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
    + * ApiHubCurateSettings.Builder apiHubCurateSettingsBuilder = ApiHubCurateSettings.newBuilder();
    + * apiHubCurateSettingsBuilder
    + *     .createCurationSettings()
    + *     .setRetrySettings(
    + *         apiHubCurateSettingsBuilder
    + *             .createCurationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubCurateSettings apiHubCurateSettings = apiHubCurateSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class ApiHubCurateSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createCuration. */ + public UnaryCallSettings createCurationSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).createCurationSettings(); + } + + /** Returns the object with the settings used for calls to getCuration. */ + public UnaryCallSettings getCurationSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).getCurationSettings(); + } + + /** Returns the object with the settings used for calls to listCurations. */ + public PagedCallSettings + listCurationsSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).listCurationsSettings(); + } + + /** Returns the object with the settings used for calls to updateCuration. */ + public UnaryCallSettings updateCurationSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).updateCurationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCuration. */ + public UnaryCallSettings deleteCurationSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).deleteCurationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ApiHubCurateStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ApiHubCurateSettings create(ApiHubCurateStubSettings stub) + throws IOException { + return new ApiHubCurateSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ApiHubCurateStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ApiHubCurateStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ApiHubCurateStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ApiHubCurateStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ApiHubCurateStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ApiHubCurateStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiHubCurateStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubCurateSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ApiHubCurateSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ApiHubCurateStubSettings.newBuilder(clientContext)); + } + + protected Builder(ApiHubCurateSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ApiHubCurateStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ApiHubCurateStubSettings.newBuilder()); + } + + public ApiHubCurateStubSettings.Builder getStubSettingsBuilder() { + return ((ApiHubCurateStubSettings.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 createCuration. */ + public UnaryCallSettings.Builder createCurationSettings() { + return getStubSettingsBuilder().createCurationSettings(); + } + + /** Returns the builder for the settings used for calls to getCuration. */ + public UnaryCallSettings.Builder getCurationSettings() { + return getStubSettingsBuilder().getCurationSettings(); + } + + /** Returns the builder for the settings used for calls to listCurations. */ + public PagedCallSettings.Builder< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse> + listCurationsSettings() { + return getStubSettingsBuilder().listCurationsSettings(); + } + + /** Returns the builder for the settings used for calls to updateCuration. */ + public UnaryCallSettings.Builder updateCurationSettings() { + return getStubSettingsBuilder().updateCurationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCuration. */ + public UnaryCallSettings.Builder deleteCurationSettings() { + return getStubSettingsBuilder().deleteCurationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ApiHubCurateSettings build() throws IOException { + return new ApiHubCurateSettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClient.java new file mode 100644 index 000000000000..af1c6e5ef985 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClient.java @@ -0,0 +1,1358 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.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.apihub.v1.stub.ApiHubDiscoveryStub; +import com.google.cloud.apihub.v1.stub.ApiHubDiscoveryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: This service exposes methods used to manage DiscoveredApiObservations and + * DiscoveredApiOperations. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    + *   DiscoveredApiObservationName name =
    + *       DiscoveredApiObservationName.of(
    + *           "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
    + *   DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
    + * }
    + * }
    + * + *

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

    ListDiscoveredApiObservations

    Lists all the DiscoveredAPIObservations in a given project and location.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listDiscoveredApiObservations(ListDiscoveredApiObservationsRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • listDiscoveredApiObservations(LocationName parent) + *

    • listDiscoveredApiObservations(String parent) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listDiscoveredApiObservationsPagedCallable() + *

    • listDiscoveredApiObservationsCallable() + *

    + *

    GetDiscoveredApiObservation

    Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getDiscoveredApiObservation(GetDiscoveredApiObservationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • getDiscoveredApiObservation(DiscoveredApiObservationName name) + *

    • getDiscoveredApiObservation(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getDiscoveredApiObservationCallable() + *

    + *

    ListDiscoveredApiOperations

    Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listDiscoveredApiOperations(ListDiscoveredApiOperationsRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • listDiscoveredApiOperations(DiscoveredApiObservationName parent) + *

    • listDiscoveredApiOperations(String parent) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listDiscoveredApiOperationsPagedCallable() + *

    • listDiscoveredApiOperationsCallable() + *

    + *

    GetDiscoveredApiOperation

    Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getDiscoveredApiOperation(GetDiscoveredApiOperationRequest request) + *

    + *

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    + *
      + *
    • getDiscoveredApiOperation(DiscoveredApiOperationName name) + *

    • getDiscoveredApiOperation(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getDiscoveredApiOperationCallable() + *

    + *

    ListLocations

    Lists information about the supported locations for this service.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • listLocations(ListLocationsRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • listLocationsPagedCallable() + *

    • listLocationsCallable() + *

    + *

    GetLocation

    Gets information about a location.

    + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • getLocation(GetLocationRequest request) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • getLocationCallable() + *

    + *
    + * + *

    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 ApiHubDiscoverySettings 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
    + * ApiHubDiscoverySettings apiHubDiscoverySettings =
    + *     ApiHubDiscoverySettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * ApiHubDiscoveryClient apiHubDiscoveryClient =
    + *     ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
    + * }
    + * + *

    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
    + * ApiHubDiscoverySettings apiHubDiscoverySettings =
    + *     ApiHubDiscoverySettings.newBuilder().setEndpoint(myEndpoint).build();
    + * ApiHubDiscoveryClient apiHubDiscoveryClient =
    + *     ApiHubDiscoveryClient.create(apiHubDiscoverySettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ApiHubDiscoveryClient implements BackgroundResource { + private final ApiHubDiscoverySettings settings; + private final ApiHubDiscoveryStub stub; + + /** Constructs an instance of ApiHubDiscoveryClient with default settings. */ + public static final ApiHubDiscoveryClient create() throws IOException { + return create(ApiHubDiscoverySettings.newBuilder().build()); + } + + /** + * Constructs an instance of ApiHubDiscoveryClient, 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 ApiHubDiscoveryClient create(ApiHubDiscoverySettings settings) + throws IOException { + return new ApiHubDiscoveryClient(settings); + } + + /** + * Constructs an instance of ApiHubDiscoveryClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ApiHubDiscoverySettings). + */ + public static final ApiHubDiscoveryClient create(ApiHubDiscoveryStub stub) { + return new ApiHubDiscoveryClient(stub); + } + + /** + * Constructs an instance of ApiHubDiscoveryClient, 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 ApiHubDiscoveryClient(ApiHubDiscoverySettings settings) throws IOException { + this.settings = settings; + this.stub = ((ApiHubDiscoveryStubSettings) settings.getStubSettings()).createStub(); + } + + protected ApiHubDiscoveryClient(ApiHubDiscoveryStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ApiHubDiscoverySettings getSettings() { + return settings; + } + + public ApiHubDiscoveryStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIObservations 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   for (DiscoveredApiObservation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of ApiObservations. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations( + LocationName parent) { + ListDiscoveredApiObservationsRequest request = + ListDiscoveredApiObservationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDiscoveredApiObservations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIObservations 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    +   *   for (DiscoveredApiObservation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiObservations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of ApiObservations. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations( + String parent) { + ListDiscoveredApiObservationsRequest request = + ListDiscoveredApiObservationsRequest.newBuilder().setParent(parent).build(); + return listDiscoveredApiObservations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIObservations 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiObservationsRequest request =
    +   *       ListDiscoveredApiObservationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (DiscoveredApiObservation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiObservations(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 ListDiscoveredApiObservationsPagedResponse listDiscoveredApiObservations( + ListDiscoveredApiObservationsRequest request) { + return listDiscoveredApiObservationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIObservations 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiObservationsRequest request =
    +   *       ListDiscoveredApiObservationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubDiscoveryClient.listDiscoveredApiObservationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (DiscoveredApiObservation element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsPagedCallable() { + return stub.listDiscoveredApiObservationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIObservations 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiObservationsRequest request =
    +   *       ListDiscoveredApiObservationsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListDiscoveredApiObservationsResponse response =
    +   *         apiHubDiscoveryClient.listDiscoveredApiObservationsCallable().call(request);
    +   *     for (DiscoveredApiObservation element : response.getDiscoveredApiObservationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse> + listDiscoveredApiObservationsCallable() { + return stub.listDiscoveredApiObservationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   DiscoveredApiObservationName name =
    +   *       DiscoveredApiObservationName.of(
    +   *           "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
    +   *   DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the DiscoveredApiObservation to retrieve. Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredApiObservation getDiscoveredApiObservation( + DiscoveredApiObservationName name) { + GetDiscoveredApiObservationRequest request = + GetDiscoveredApiObservationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDiscoveredApiObservation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   String name =
    +   *       DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *           .toString();
    +   *   DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the DiscoveredApiObservation to retrieve. Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredApiObservation getDiscoveredApiObservation(String name) { + GetDiscoveredApiObservationRequest request = + GetDiscoveredApiObservationRequest.newBuilder().setName(name).build(); + return getDiscoveredApiObservation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetDiscoveredApiObservationRequest request =
    +   *       GetDiscoveredApiObservationRequest.newBuilder()
    +   *           .setName(
    +   *               DiscoveredApiObservationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   DiscoveredApiObservation response =
    +   *       apiHubDiscoveryClient.getDiscoveredApiObservation(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 DiscoveredApiObservation getDiscoveredApiObservation( + GetDiscoveredApiObservationRequest request) { + return getDiscoveredApiObservationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIObservation in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetDiscoveredApiObservationRequest request =
    +   *       GetDiscoveredApiObservationRequest.newBuilder()
    +   *           .setName(
    +   *               DiscoveredApiObservationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubDiscoveryClient.getDiscoveredApiObservationCallable().futureCall(request);
    +   *   // Do something.
    +   *   DiscoveredApiObservation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + getDiscoveredApiObservationCallable() { + return stub.getDiscoveredApiObservationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   DiscoveredApiObservationName parent =
    +   *       DiscoveredApiObservationName.of(
    +   *           "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
    +   *   for (DiscoveredApiOperation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of DiscoveredApiOperations. + * Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations( + DiscoveredApiObservationName parent) { + ListDiscoveredApiOperationsRequest request = + ListDiscoveredApiOperationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDiscoveredApiOperations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   String parent =
    +   *       DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *           .toString();
    +   *   for (DiscoveredApiOperation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiOperations(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of DiscoveredApiOperations. + * Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations(String parent) { + ListDiscoveredApiOperationsRequest request = + ListDiscoveredApiOperationsRequest.newBuilder().setParent(parent).build(); + return listDiscoveredApiOperations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiOperationsRequest request =
    +   *       ListDiscoveredApiOperationsRequest.newBuilder()
    +   *           .setParent(
    +   *               DiscoveredApiObservationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (DiscoveredApiOperation element :
    +   *       apiHubDiscoveryClient.listDiscoveredApiOperations(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 ListDiscoveredApiOperationsPagedResponse listDiscoveredApiOperations( + ListDiscoveredApiOperationsRequest request) { + return listDiscoveredApiOperationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiOperationsRequest request =
    +   *       ListDiscoveredApiOperationsRequest.newBuilder()
    +   *           .setParent(
    +   *               DiscoveredApiObservationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubDiscoveryClient.listDiscoveredApiOperationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (DiscoveredApiOperation element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsPagedCallable() { + return stub.listDiscoveredApiOperationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListDiscoveredApiOperationsRequest request =
    +   *       ListDiscoveredApiOperationsRequest.newBuilder()
    +   *           .setParent(
    +   *               DiscoveredApiObservationName.of(
    +   *                       "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListDiscoveredApiOperationsResponse response =
    +   *         apiHubDiscoveryClient.listDiscoveredApiOperationsCallable().call(request);
    +   *     for (DiscoveredApiOperation element : response.getDiscoveredApiOperationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsResponse> + listDiscoveredApiOperationsCallable() { + return stub.listDiscoveredApiOperationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   DiscoveredApiOperationName name =
    +   *       DiscoveredApiOperationName.of(
    +   *           "[PROJECT]",
    +   *           "[LOCATION]",
    +   *           "[DISCOVERED_API_OBSERVATION]",
    +   *           "[DISCOVERED_API_OPERATION]");
    +   *   DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the DiscoveredApiOperation to retrieve. Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredApiOperation getDiscoveredApiOperation(DiscoveredApiOperationName name) { + GetDiscoveredApiOperationRequest request = + GetDiscoveredApiOperationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDiscoveredApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   String name =
    +   *       DiscoveredApiOperationName.of(
    +   *               "[PROJECT]",
    +   *               "[LOCATION]",
    +   *               "[DISCOVERED_API_OBSERVATION]",
    +   *               "[DISCOVERED_API_OPERATION]")
    +   *           .toString();
    +   *   DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the DiscoveredApiOperation to retrieve. Format: + * projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredApiOperation getDiscoveredApiOperation(String name) { + GetDiscoveredApiOperationRequest request = + GetDiscoveredApiOperationRequest.newBuilder().setName(name).build(); + return getDiscoveredApiOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetDiscoveredApiOperationRequest request =
    +   *       GetDiscoveredApiOperationRequest.newBuilder()
    +   *           .setName(
    +   *               DiscoveredApiOperationName.of(
    +   *                       "[PROJECT]",
    +   *                       "[LOCATION]",
    +   *                       "[DISCOVERED_API_OBSERVATION]",
    +   *                       "[DISCOVERED_API_OPERATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   DiscoveredApiOperation response = apiHubDiscoveryClient.getDiscoveredApiOperation(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 DiscoveredApiOperation getDiscoveredApiOperation( + GetDiscoveredApiOperationRequest request) { + return getDiscoveredApiOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetDiscoveredApiOperationRequest request =
    +   *       GetDiscoveredApiOperationRequest.newBuilder()
    +   *           .setName(
    +   *               DiscoveredApiOperationName.of(
    +   *                       "[PROJECT]",
    +   *                       "[LOCATION]",
    +   *                       "[DISCOVERED_API_OBSERVATION]",
    +   *                       "[DISCOVERED_API_OPERATION]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubDiscoveryClient.getDiscoveredApiOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   DiscoveredApiOperation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + getDiscoveredApiOperationCallable() { + return stub.getDiscoveredApiOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Location element : apiHubDiscoveryClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubDiscoveryClient.listLocationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Location element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListLocationsResponse response =
    +   *         apiHubDiscoveryClient.listLocationsCallable().call(request);
    +   *     for (Location element : response.getLocationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   Location response = apiHubDiscoveryClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   ApiFuture future = apiHubDiscoveryClient.getLocationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Location response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListDiscoveredApiObservationsPagedResponse + extends AbstractPagedListResponse< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation, + ListDiscoveredApiObservationsPage, + ListDiscoveredApiObservationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDiscoveredApiObservationsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDiscoveredApiObservationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDiscoveredApiObservationsPagedResponse(ListDiscoveredApiObservationsPage page) { + super(page, ListDiscoveredApiObservationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDiscoveredApiObservationsPage + extends AbstractPage< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation, + ListDiscoveredApiObservationsPage> { + + private ListDiscoveredApiObservationsPage( + PageContext< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + context, + ListDiscoveredApiObservationsResponse response) { + super(context, response); + } + + private static ListDiscoveredApiObservationsPage createEmptyPage() { + return new ListDiscoveredApiObservationsPage(null, null); + } + + @Override + protected ListDiscoveredApiObservationsPage createPage( + PageContext< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + context, + ListDiscoveredApiObservationsResponse response) { + return new ListDiscoveredApiObservationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDiscoveredApiObservationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation, + ListDiscoveredApiObservationsPage, + ListDiscoveredApiObservationsFixedSizeCollection> { + + private ListDiscoveredApiObservationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDiscoveredApiObservationsFixedSizeCollection createEmptyCollection() { + return new ListDiscoveredApiObservationsFixedSizeCollection(null, 0); + } + + @Override + protected ListDiscoveredApiObservationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDiscoveredApiObservationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDiscoveredApiOperationsPagedResponse + extends AbstractPagedListResponse< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation, + ListDiscoveredApiOperationsPage, + ListDiscoveredApiOperationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDiscoveredApiOperationsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDiscoveredApiOperationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDiscoveredApiOperationsPagedResponse(ListDiscoveredApiOperationsPage page) { + super(page, ListDiscoveredApiOperationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDiscoveredApiOperationsPage + extends AbstractPage< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation, + ListDiscoveredApiOperationsPage> { + + private ListDiscoveredApiOperationsPage( + PageContext< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + context, + ListDiscoveredApiOperationsResponse response) { + super(context, response); + } + + private static ListDiscoveredApiOperationsPage createEmptyPage() { + return new ListDiscoveredApiOperationsPage(null, null); + } + + @Override + protected ListDiscoveredApiOperationsPage createPage( + PageContext< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + context, + ListDiscoveredApiOperationsResponse response) { + return new ListDiscoveredApiOperationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDiscoveredApiOperationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation, + ListDiscoveredApiOperationsPage, + ListDiscoveredApiOperationsFixedSizeCollection> { + + private ListDiscoveredApiOperationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDiscoveredApiOperationsFixedSizeCollection createEmptyCollection() { + return new ListDiscoveredApiOperationsFixedSizeCollection(null, 0); + } + + @Override + protected ListDiscoveredApiOperationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDiscoveredApiOperationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoverySettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoverySettings.java new file mode 100644 index 000000000000..bd9349bf04d7 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubDiscoverySettings.java @@ -0,0 +1,281 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.apihub.v1.stub.ApiHubDiscoveryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 ApiHubDiscoveryClient}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDiscoveredApiObservation: + * + *

    {@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
    + * ApiHubDiscoverySettings.Builder apiHubDiscoverySettingsBuilder =
    + *     ApiHubDiscoverySettings.newBuilder();
    + * apiHubDiscoverySettingsBuilder
    + *     .getDiscoveredApiObservationSettings()
    + *     .setRetrySettings(
    + *         apiHubDiscoverySettingsBuilder
    + *             .getDiscoveredApiObservationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubDiscoverySettings apiHubDiscoverySettings = apiHubDiscoverySettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class ApiHubDiscoverySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDiscoveredApiObservations. */ + public PagedCallSettings< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()) + .listDiscoveredApiObservationsSettings(); + } + + /** Returns the object with the settings used for calls to getDiscoveredApiObservation. */ + public UnaryCallSettings + getDiscoveredApiObservationSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()).getDiscoveredApiObservationSettings(); + } + + /** Returns the object with the settings used for calls to listDiscoveredApiOperations. */ + public PagedCallSettings< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()).listDiscoveredApiOperationsSettings(); + } + + /** Returns the object with the settings used for calls to getDiscoveredApi. */ + public UnaryCallSettings + getDiscoveredApiOperationSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()).getDiscoveredApiOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ApiHubDiscoveryStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ApiHubDiscoverySettings create(ApiHubDiscoveryStubSettings stub) + throws IOException { + return new ApiHubDiscoverySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ApiHubDiscoveryStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ApiHubDiscoveryStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ApiHubDiscoveryStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ApiHubDiscoveryStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ApiHubDiscoveryStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ApiHubDiscoveryStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiHubDiscoveryStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubDiscoverySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ApiHubDiscoverySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ApiHubDiscoveryStubSettings.newBuilder(clientContext)); + } + + protected Builder(ApiHubDiscoverySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ApiHubDiscoveryStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ApiHubDiscoveryStubSettings.newBuilder()); + } + + public ApiHubDiscoveryStubSettings.Builder getStubSettingsBuilder() { + return ((ApiHubDiscoveryStubSettings.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 listDiscoveredApiObservations. */ + public PagedCallSettings.Builder< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings() { + return getStubSettingsBuilder().listDiscoveredApiObservationsSettings(); + } + + /** Returns the builder for the settings used for calls to getDiscoveredApiObservation. */ + public UnaryCallSettings.Builder + getDiscoveredApiObservationSettings() { + return getStubSettingsBuilder().getDiscoveredApiObservationSettings(); + } + + /** Returns the builder for the settings used for calls to listDiscoveredApiOperations. */ + public PagedCallSettings.Builder< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings() { + return getStubSettingsBuilder().listDiscoveredApiOperationsSettings(); + } + + /** Returns the builder for the settings used for calls to getDiscoveredApi. */ + public UnaryCallSettings.Builder + getDiscoveredApiOperationSettings() { + return getStubSettingsBuilder().getDiscoveredApiOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ApiHubDiscoverySettings build() throws IOException { + return new ApiHubDiscoverySettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginClient.java index fb70fb9bf320..70f116457b68 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginClient.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginClient.java @@ -19,9 +19,12 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; 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.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.apihub.v1.stub.ApiHubPluginStub; @@ -31,6 +34,9 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; @@ -67,7 +73,7 @@ * * *

    GetPlugin - *

    Get details about an API Hub plugin. + *

    Get an API Hub plugin. * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    *
      @@ -123,6 +129,228 @@ * * * + *

      CreatePlugin + *

      Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • createPlugin(CreatePluginRequest request) + *

      + *

      "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

      + *
        + *
      • createPlugin(LocationName parent, Plugin plugin, String pluginId) + *

      • createPlugin(String parent, Plugin plugin, String pluginId) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • createPluginCallable() + *

      + * + * + * + *

      ListPlugins + *

      List all the plugins in a given project and location. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • listPlugins(ListPluginsRequest request) + *

      + *

      "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

      + *
        + *
      • listPlugins(LocationName parent) + *

      • listPlugins(String parent) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • listPluginsPagedCallable() + *

      • listPluginsCallable() + *

      + * + * + * + *

      DeletePlugin + *

      Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • deletePluginAsync(DeletePluginRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • deletePluginAsync(PluginName name) + *

      • deletePluginAsync(String name) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • deletePluginOperationCallable() + *

      • deletePluginCallable() + *

      + * + * + * + *

      CreatePluginInstance + *

      Creates a Plugin instance in the API hub. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • createPluginInstanceAsync(CreatePluginInstanceRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • createPluginInstanceAsync(PluginName parent, PluginInstance pluginInstance, String pluginInstanceId) + *

      • createPluginInstanceAsync(String parent, PluginInstance pluginInstance, String pluginInstanceId) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • createPluginInstanceOperationCallable() + *

      • createPluginInstanceCallable() + *

      + * + * + * + *

      ExecutePluginInstanceAction + *

      Executes a plugin instance in the API hub. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • executePluginInstanceActionAsync(ExecutePluginInstanceActionRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • executePluginInstanceActionAsync(PluginInstanceName name, ActionExecutionDetail actionExecutionDetail) + *

      • executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • executePluginInstanceActionOperationCallable() + *

      • executePluginInstanceActionCallable() + *

      + * + * + * + *

      GetPluginInstance + *

      Get an API Hub plugin instance. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • getPluginInstance(GetPluginInstanceRequest request) + *

      + *

      "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

      + *
        + *
      • getPluginInstance(PluginInstanceName name) + *

      • getPluginInstance(String name) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • getPluginInstanceCallable() + *

      + * + * + * + *

      ListPluginInstances + *

      List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id} + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • listPluginInstances(ListPluginInstancesRequest request) + *

      + *

      "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

      + *
        + *
      • listPluginInstances(PluginName parent) + *

      • listPluginInstances(String parent) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • listPluginInstancesPagedCallable() + *

      • listPluginInstancesCallable() + *

      + * + * + * + *

      EnablePluginInstanceAction + *

      Enables a plugin instance in the API hub. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • enablePluginInstanceActionAsync(EnablePluginInstanceActionRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • enablePluginInstanceActionAsync(PluginInstanceName name, String actionId) + *

      • enablePluginInstanceActionAsync(String name, String actionId) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • enablePluginInstanceActionOperationCallable() + *

      • enablePluginInstanceActionCallable() + *

      + * + * + * + *

      DisablePluginInstanceAction + *

      Disables a plugin instance in the API hub. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • disablePluginInstanceActionAsync(DisablePluginInstanceActionRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • disablePluginInstanceActionAsync(PluginInstanceName name, String actionId) + *

      • disablePluginInstanceActionAsync(String name, String actionId) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • disablePluginInstanceActionOperationCallable() + *

      • disablePluginInstanceActionCallable() + *

      + * + * + * + *

      UpdatePluginInstance + *

      Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently: + *

        + *
      • [display_name][google.cloud.apihub.v1.PluginInstance.display_name] + *
      • [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] + *
      + *

      The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated. + *

      To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • updatePluginInstance(UpdatePluginInstanceRequest request) + *

      + *

      "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

      + *
        + *
      • updatePluginInstance(PluginInstance pluginInstance, FieldMask updateMask) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • updatePluginInstanceCallable() + *

      + * + * + * + *

      DeletePluginInstance + *

      Deletes a plugin instance in the API hub. + * + *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      + *
        + *
      • deletePluginInstanceAsync(DeletePluginInstanceRequest request) + *

      + *

      Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

      + *
        + *
      • deletePluginInstanceAsync(PluginInstanceName name) + *

      • deletePluginInstanceAsync(String name) + *

      + *

      Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

      + *
        + *
      • deletePluginInstanceOperationCallable() + *

      • deletePluginInstanceCallable() + *

      + * + * + * *

      ListLocations *

      Lists information about the supported locations for this service. * @@ -196,6 +424,7 @@ public class ApiHubPluginClient implements BackgroundResource { private final ApiHubPluginSettings settings; private final ApiHubPluginStub stub; + private final OperationsClient httpJsonOperationsClient; /** Constructs an instance of ApiHubPluginClient with default settings. */ public static final ApiHubPluginClient create() throws IOException { @@ -226,11 +455,13 @@ public static final ApiHubPluginClient create(ApiHubPluginStub stub) { protected ApiHubPluginClient(ApiHubPluginSettings settings) throws IOException { this.settings = settings; this.stub = ((ApiHubPluginStubSettings) settings.getStubSettings()).createStub(); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected ApiHubPluginClient(ApiHubPluginStub stub) { this.settings = null; this.stub = stub; + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final ApiHubPluginSettings getSettings() { @@ -241,9 +472,17 @@ public ApiHubPluginStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *

      Sample code: * @@ -271,7 +510,7 @@ public final Plugin getPlugin(PluginName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *

      Sample code: * @@ -298,7 +537,7 @@ public final Plugin getPlugin(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *

      Sample code: * @@ -326,7 +565,7 @@ public final Plugin getPlugin(GetPluginRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get details about an API Hub plugin. + * Get an API Hub plugin. * *

      Sample code: * @@ -573,7 +812,8 @@ public final UnaryCallable disablePluginCallable() // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to + * create plugin instances. * *

      Sample code: * @@ -584,29 +824,119 @@ public final UnaryCallable disablePluginCallable() * // - 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Plugin plugin = Plugin.newBuilder().build(); + * String pluginId = "pluginId-1859618898"; + * Plugin response = apiHubPluginClient.createPlugin(parent, plugin, pluginId); + * } + * }

    + * + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}`. + * @param plugin Required. The plugin to create. + * @param pluginId Optional. The ID to use for the Plugin resource, which will become the final + * component of the Plugin's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another Plugin resource in the API hub instance. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-63 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000 + * characters and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Plugin createPlugin(LocationName parent, Plugin plugin, String pluginId) { + CreatePluginRequest request = + CreatePluginRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPlugin(plugin) + .setPluginId(pluginId) + .build(); + return createPlugin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to + * create plugin instances. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    +   *   Plugin plugin = Plugin.newBuilder().build();
    +   *   String pluginId = "pluginId-1859618898";
    +   *   Plugin response = apiHubPluginClient.createPlugin(parent, plugin, pluginId);
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}`. + * @param plugin Required. The plugin to create. + * @param pluginId Optional. The ID to use for the Plugin resource, which will become the final + * component of the Plugin's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another Plugin resource in the API hub instance. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-63 characters, overall resource name which will be of format + * `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000 + * characters and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Plugin createPlugin(String parent, Plugin plugin, String pluginId) { + CreatePluginRequest request = + CreatePluginRequest.newBuilder() + .setParent(parent) + .setPlugin(plugin) + .setPluginId(pluginId) + .build(); + return createPlugin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to + * create plugin instances. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   CreatePluginRequest request =
    +   *       CreatePluginRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setPluginId("pluginId-1859618898")
    +   *           .setPlugin(Plugin.newBuilder().build())
        *           .build();
    -   *   for (Location element : apiHubPluginClient.listLocations(request).iterateAll()) {
    -   *     // doThingsWith(element);
    -   *   }
    +   *   Plugin response = apiHubPluginClient.createPlugin(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { - return listLocationsPagedCallable().call(request); + public final Plugin createPlugin(CreatePluginRequest request) { + return createPluginCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to + * create plugin instances. * *

    Sample code: * @@ -617,30 +947,25 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * CreatePluginRequest request = + * CreatePluginRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPluginId("pluginId-1859618898") + * .setPlugin(Plugin.newBuilder().build()) * .build(); - * ApiFuture future = - * apiHubPluginClient.listLocationsPagedCallable().futureCall(request); + * ApiFuture future = apiHubPluginClient.createPluginCallable().futureCall(request); * // Do something. - * for (Location element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * Plugin response = future.get(); * } * }

  • */ - public final UnaryCallable - listLocationsPagedCallable() { - return stub.listLocationsPagedCallable(); + public final UnaryCallable createPluginCallable() { + return stub.createPluginCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * List all the plugins in a given project and location. * *

    Sample code: * @@ -651,35 +976,28 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListLocationsResponse response = apiHubPluginClient.listLocationsCallable().call(request); - * for (Location element : response.getLocationsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Plugin element : apiHubPluginClient.listPlugins(parent).iterateAll()) { + * // doThingsWith(element); * } * } * }

  • + * + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable listLocationsCallable() { - return stub.listLocationsCallable(); + public final ListPluginsPagedResponse listPlugins(LocationName parent) { + ListPluginsRequest request = + ListPluginsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPlugins(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * List all the plugins in a given project and location. * *

    Sample code: * @@ -690,21 +1008,25 @@ public final UnaryCallable listLoca * // - 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * Location response = apiHubPluginClient.getLocation(request); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Plugin element : apiHubPluginClient.listPlugins(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Location getLocation(GetLocationRequest request) { - return getLocationCallable().call(request); + public final ListPluginsPagedResponse listPlugins(String parent) { + ListPluginsRequest request = ListPluginsRequest.newBuilder().setParent(parent).build(); + return listPlugins(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * List all the plugins in a given project and location. * *

    Sample code: * @@ -715,18 +1037,1678 @@ public final Location getLocation(GetLocationRequest request) { * // - 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * ApiFuture future = apiHubPluginClient.getLocationCallable().futureCall(request); - * // Do something. - * Location response = future.get(); + * ListPluginsRequest request = + * ListPluginsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Plugin element : apiHubPluginClient.listPlugins(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 UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); + public final ListPluginsPagedResponse listPlugins(ListPluginsRequest request) { + return listPluginsPagedCallable().call(request); } - @Override + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListPluginsRequest request =
    +   *       ListPluginsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future = apiHubPluginClient.listPluginsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Plugin element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listPluginsPagedCallable() { + return stub.listPluginsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListPluginsRequest request =
    +   *       ListPluginsRequest.newBuilder()
    +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListPluginsResponse response = apiHubPluginClient.listPluginsCallable().call(request);
    +   *     for (Plugin element : response.getPluginsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listPluginsCallable() { + return stub.listPluginsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
    +   *   apiHubPluginClient.deletePluginAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the Plugin resource to delete. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePluginAsync(PluginName name) { + DeletePluginRequest request = + DeletePluginRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deletePluginAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
    +   *   apiHubPluginClient.deletePluginAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the Plugin resource to delete. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePluginAsync(String name) { + DeletePluginRequest request = DeletePluginRequest.newBuilder().setName(name).build(); + return deletePluginAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginRequest request =
    +   *       DeletePluginRequest.newBuilder()
    +   *           .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .build();
    +   *   apiHubPluginClient.deletePluginAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture deletePluginAsync( + DeletePluginRequest request) { + return deletePluginOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginRequest request =
    +   *       DeletePluginRequest.newBuilder()
    +   *           .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.deletePluginOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + deletePluginOperationCallable() { + return stub.deletePluginOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginRequest request =
    +   *       DeletePluginRequest.newBuilder()
    +   *           .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .build();
    +   *   ApiFuture future = apiHubPluginClient.deletePluginCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deletePluginCallable() { + return stub.deletePluginCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
    +   *   PluginInstance pluginInstance = PluginInstance.newBuilder().build();
    +   *   String pluginInstanceId = "pluginInstanceId-1741818845";
    +   *   PluginInstance response =
    +   *       apiHubPluginClient
    +   *           .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId)
    +   *           .get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent of the plugin instance resource. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}` + * @param pluginInstance Required. The plugin instance to create. + * @param pluginInstanceId Optional. The ID to use for the plugin instance, which will become the + * final component of the plugin instance's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another plugin instance in the plugin resource. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPluginInstanceAsync( + PluginName parent, PluginInstance pluginInstance, String pluginInstanceId) { + CreatePluginInstanceRequest request = + CreatePluginInstanceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPluginInstance(pluginInstance) + .setPluginInstanceId(pluginInstanceId) + .build(); + return createPluginInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
    +   *   PluginInstance pluginInstance = PluginInstance.newBuilder().build();
    +   *   String pluginInstanceId = "pluginInstanceId-1741818845";
    +   *   PluginInstance response =
    +   *       apiHubPluginClient
    +   *           .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId)
    +   *           .get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent of the plugin instance resource. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}` + * @param pluginInstance Required. The plugin instance to create. + * @param pluginInstanceId Optional. The ID to use for the plugin instance, which will become the + * final component of the plugin instance's resource name. This field is optional. + *
      + *
    • If provided, the same will be used. The service will throw an error if the specified + * id is already used by another plugin instance in the plugin resource. + *
    • If not provided, a system generated id will be used. + *
    + *

    This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPluginInstanceAsync( + String parent, PluginInstance pluginInstance, String pluginInstanceId) { + CreatePluginInstanceRequest request = + CreatePluginInstanceRequest.newBuilder() + .setParent(parent) + .setPluginInstance(pluginInstance) + .setPluginInstanceId(pluginInstanceId) + .build(); + return createPluginInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   CreatePluginInstanceRequest request =
    +   *       CreatePluginInstanceRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setPluginInstanceId("pluginInstanceId-1741818845")
    +   *           .setPluginInstance(PluginInstance.newBuilder().build())
    +   *           .build();
    +   *   PluginInstance response = apiHubPluginClient.createPluginInstanceAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture createPluginInstanceAsync( + CreatePluginInstanceRequest request) { + return createPluginInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   CreatePluginInstanceRequest request =
    +   *       CreatePluginInstanceRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setPluginInstanceId("pluginInstanceId-1741818845")
    +   *           .setPluginInstance(PluginInstance.newBuilder().build())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.createPluginInstanceOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   PluginInstance response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + createPluginInstanceOperationCallable() { + return stub.createPluginInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   CreatePluginInstanceRequest request =
    +   *       CreatePluginInstanceRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setPluginInstanceId("pluginInstanceId-1741818845")
    +   *           .setPluginInstance(PluginInstance.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.createPluginInstanceCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + createPluginInstanceCallable() { + return stub.createPluginInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstanceName name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
    +   *   ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build();
    +   *   ExecutePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to execute. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionExecutionDetail Required. The execution details for the action to execute. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + executePluginInstanceActionAsync( + PluginInstanceName name, ActionExecutionDetail actionExecutionDetail) { + ExecutePluginInstanceActionRequest request = + ExecutePluginInstanceActionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setActionExecutionDetail(actionExecutionDetail) + .build(); + return executePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
    +   *   ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build();
    +   *   ExecutePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to execute. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionExecutionDetail Required. The execution details for the action to execute. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail) { + ExecutePluginInstanceActionRequest request = + ExecutePluginInstanceActionRequest.newBuilder() + .setName(name) + .setActionExecutionDetail(actionExecutionDetail) + .build(); + return executePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ExecutePluginInstanceActionRequest request =
    +   *       ExecutePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
    +   *           .build();
    +   *   ExecutePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.executePluginInstanceActionAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture + executePluginInstanceActionAsync(ExecutePluginInstanceActionRequest request) { + return executePluginInstanceActionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ExecutePluginInstanceActionRequest request =
    +   *       ExecutePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.executePluginInstanceActionOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   ExecutePluginInstanceActionResponse response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationCallable() { + return stub.executePluginInstanceActionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ExecutePluginInstanceActionRequest request =
    +   *       ExecutePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.executePluginInstanceActionCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + executePluginInstanceActionCallable() { + return stub.executePluginInstanceActionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an API Hub plugin instance. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstanceName name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
    +   *   PluginInstance response = apiHubPluginClient.getPluginInstance(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to retrieve. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PluginInstance getPluginInstance(PluginInstanceName name) { + GetPluginInstanceRequest request = + GetPluginInstanceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPluginInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an API Hub plugin instance. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
    +   *   PluginInstance response = apiHubPluginClient.getPluginInstance(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to retrieve. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PluginInstance getPluginInstance(String name) { + GetPluginInstanceRequest request = GetPluginInstanceRequest.newBuilder().setName(name).build(); + return getPluginInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an API Hub plugin instance. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   GetPluginInstanceRequest request =
    +   *       GetPluginInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .build();
    +   *   PluginInstance response = apiHubPluginClient.getPluginInstance(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 PluginInstance getPluginInstance(GetPluginInstanceRequest request) { + return getPluginInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an API Hub plugin instance. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   GetPluginInstanceRequest request =
    +   *       GetPluginInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.getPluginInstanceCallable().futureCall(request);
    +   *   // Do something.
    +   *   PluginInstance response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getPluginInstanceCallable() { + return stub.getPluginInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins in a given project and location. `-` can be used as wildcard value for + * {plugin_id} + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
    +   *   for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for + * multiple plugins, use the - character instead of the plugin ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPluginInstancesPagedResponse listPluginInstances(PluginName parent) { + ListPluginInstancesRequest request = + ListPluginInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPluginInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins in a given project and location. `-` can be used as wildcard value for + * {plugin_id} + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString();
    +   *   for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource where this plugin will be created. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for + * multiple plugins, use the - character instead of the plugin ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPluginInstancesPagedResponse listPluginInstances(String parent) { + ListPluginInstancesRequest request = + ListPluginInstancesRequest.newBuilder().setParent(parent).build(); + return listPluginInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins in a given project and location. `-` can be used as wildcard value for + * {plugin_id} + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListPluginInstancesRequest request =
    +   *       ListPluginInstancesRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (PluginInstance element : apiHubPluginClient.listPluginInstances(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 ListPluginInstancesPagedResponse listPluginInstances( + ListPluginInstancesRequest request) { + return listPluginInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins in a given project and location. `-` can be used as wildcard value for + * {plugin_id} + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListPluginInstancesRequest request =
    +   *       ListPluginInstancesRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.listPluginInstancesPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (PluginInstance element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listPluginInstancesPagedCallable() { + return stub.listPluginInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all the plugins in a given project and location. `-` can be used as wildcard value for + * {plugin_id} + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListPluginInstancesRequest request =
    +   *       ListPluginInstancesRequest.newBuilder()
    +   *           .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString())
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListPluginInstancesResponse response =
    +   *         apiHubPluginClient.listPluginInstancesCallable().call(request);
    +   *     for (PluginInstance element : response.getPluginInstancesList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listPluginInstancesCallable() { + return stub.listPluginInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstanceName name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
    +   *   String actionId = "actionId-1656172047";
    +   *   EnablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to enable. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionId Required. The action id to enable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + enablePluginInstanceActionAsync(PluginInstanceName name, String actionId) { + EnablePluginInstanceActionRequest request = + EnablePluginInstanceActionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setActionId(actionId) + .build(); + return enablePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
    +   *   String actionId = "actionId-1656172047";
    +   *   EnablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to enable. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionId Required. The action id to enable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + enablePluginInstanceActionAsync(String name, String actionId) { + EnablePluginInstanceActionRequest request = + EnablePluginInstanceActionRequest.newBuilder().setName(name).setActionId(actionId).build(); + return enablePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   EnablePluginInstanceActionRequest request =
    +   *       EnablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   EnablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.enablePluginInstanceActionAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture + enablePluginInstanceActionAsync(EnablePluginInstanceActionRequest request) { + return enablePluginInstanceActionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   EnablePluginInstanceActionRequest request =
    +   *       EnablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.enablePluginInstanceActionOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   EnablePluginInstanceActionResponse response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationCallable() { + return stub.enablePluginInstanceActionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   EnablePluginInstanceActionRequest request =
    +   *       EnablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.enablePluginInstanceActionCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + enablePluginInstanceActionCallable() { + return stub.enablePluginInstanceActionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstanceName name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
    +   *   String actionId = "actionId-1656172047";
    +   *   DisablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to disable. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionId Required. The action id to disable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + disablePluginInstanceActionAsync(PluginInstanceName name, String actionId) { + DisablePluginInstanceActionRequest request = + DisablePluginInstanceActionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setActionId(actionId) + .build(); + return disablePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
    +   *   String actionId = "actionId-1656172047";
    +   *   DisablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to disable. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` + * @param actionId Required. The action id to disable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + disablePluginInstanceActionAsync(String name, String actionId) { + DisablePluginInstanceActionRequest request = + DisablePluginInstanceActionRequest.newBuilder().setName(name).setActionId(actionId).build(); + return disablePluginInstanceActionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DisablePluginInstanceActionRequest request =
    +   *       DisablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   DisablePluginInstanceActionResponse response =
    +   *       apiHubPluginClient.disablePluginInstanceActionAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture + disablePluginInstanceActionAsync(DisablePluginInstanceActionRequest request) { + return disablePluginInstanceActionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DisablePluginInstanceActionRequest request =
    +   *       DisablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.disablePluginInstanceActionOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   DisablePluginInstanceActionResponse response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationCallable() { + return stub.disablePluginInstanceActionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DisablePluginInstanceActionRequest request =
    +   *       DisablePluginInstanceActionRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .setActionId("actionId-1656172047")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.disablePluginInstanceActionCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + disablePluginInstanceActionCallable() { + return stub.disablePluginInstanceActionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a plugin instance in the API hub. The following fields in the + * [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently: + * + *
      + *
    • [display_name][google.cloud.apihub.v1.PluginInstance.display_name] + *
    • [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and + * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin + * instance, use the + * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] + * method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstance pluginInstance = PluginInstance.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   PluginInstance response = apiHubPluginClient.updatePluginInstance(pluginInstance, updateMask);
    +   * }
    +   * }
    + * + * @param pluginInstance Required. The plugin instance to update. + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PluginInstance updatePluginInstance( + PluginInstance pluginInstance, FieldMask updateMask) { + UpdatePluginInstanceRequest request = + UpdatePluginInstanceRequest.newBuilder() + .setPluginInstance(pluginInstance) + .setUpdateMask(updateMask) + .build(); + return updatePluginInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a plugin instance in the API hub. The following fields in the + * [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently: + * + *
      + *
    • [display_name][google.cloud.apihub.v1.PluginInstance.display_name] + *
    • [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and + * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin + * instance, use the + * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] + * method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   UpdatePluginInstanceRequest request =
    +   *       UpdatePluginInstanceRequest.newBuilder()
    +   *           .setPluginInstance(PluginInstance.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   PluginInstance response = apiHubPluginClient.updatePluginInstance(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 PluginInstance updatePluginInstance(UpdatePluginInstanceRequest request) { + return updatePluginInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a plugin instance in the API hub. The following fields in the + * [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently: + * + *
      + *
    • [display_name][google.cloud.apihub.v1.PluginInstance.display_name] + *
    • [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] + *
    + * + *

    The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be + * used to specify the fields being updated. + * + *

    To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and + * [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin + * instance, use the + * [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] + * method. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   UpdatePluginInstanceRequest request =
    +   *       UpdatePluginInstanceRequest.newBuilder()
    +   *           .setPluginInstance(PluginInstance.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.updatePluginInstanceCallable().futureCall(request);
    +   *   // Do something.
    +   *   PluginInstance response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + updatePluginInstanceCallable() { + return stub.updatePluginInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   PluginInstanceName name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]");
    +   *   apiHubPluginClient.deletePluginInstanceAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to delete. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePluginInstanceAsync( + PluginInstanceName name) { + DeletePluginInstanceRequest request = + DeletePluginInstanceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deletePluginInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   String name =
    +   *       PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString();
    +   *   apiHubPluginClient.deletePluginInstanceAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the plugin instance to delete. Format: + * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deletePluginInstanceAsync(String name) { + DeletePluginInstanceRequest request = + DeletePluginInstanceRequest.newBuilder().setName(name).build(); + return deletePluginInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginInstanceRequest request =
    +   *       DeletePluginInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .build();
    +   *   apiHubPluginClient.deletePluginInstanceAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture deletePluginInstanceAsync( + DeletePluginInstanceRequest request) { + return deletePluginInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginInstanceRequest request =
    +   *       DeletePluginInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       apiHubPluginClient.deletePluginInstanceOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + deletePluginInstanceOperationCallable() { + return stub.deletePluginInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a plugin instance in the API hub. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   DeletePluginInstanceRequest request =
    +   *       DeletePluginInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.deletePluginInstanceCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + deletePluginInstanceCallable() { + return stub.deletePluginInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Location element : apiHubPluginClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       apiHubPluginClient.listLocationsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Location element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

    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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   ListLocationsRequest request =
    +   *       ListLocationsRequest.newBuilder()
    +   *           .setName("name3373707")
    +   *           .setFilter("filter-1274492040")
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListLocationsResponse response = apiHubPluginClient.listLocationsCallable().call(request);
    +   *     for (Location element : response.getLocationsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   Location response = apiHubPluginClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a 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 (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
    +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    +   *   ApiFuture future = apiHubPluginClient.getLocationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Location response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override public final void close() { stub.close(); } @@ -756,6 +2738,163 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted return stub.awaitTermination(duration, unit); } + public static class ListPluginsPagedResponse + extends AbstractPagedListResponse< + ListPluginsRequest, + ListPluginsResponse, + Plugin, + ListPluginsPage, + ListPluginsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPluginsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListPluginsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListPluginsPagedResponse(ListPluginsPage page) { + super(page, ListPluginsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPluginsPage + extends AbstractPage { + + private ListPluginsPage( + PageContext context, + ListPluginsResponse response) { + super(context, response); + } + + private static ListPluginsPage createEmptyPage() { + return new ListPluginsPage(null, null); + } + + @Override + protected ListPluginsPage createPage( + PageContext context, + ListPluginsResponse response) { + return new ListPluginsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPluginsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPluginsRequest, + ListPluginsResponse, + Plugin, + ListPluginsPage, + ListPluginsFixedSizeCollection> { + + private ListPluginsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPluginsFixedSizeCollection createEmptyCollection() { + return new ListPluginsFixedSizeCollection(null, 0); + } + + @Override + protected ListPluginsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPluginsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPluginInstancesPagedResponse + extends AbstractPagedListResponse< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + PluginInstance, + ListPluginInstancesPage, + ListPluginInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPluginInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPluginInstancesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPluginInstancesPagedResponse(ListPluginInstancesPage page) { + super(page, ListPluginInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPluginInstancesPage + extends AbstractPage< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + PluginInstance, + ListPluginInstancesPage> { + + private ListPluginInstancesPage( + PageContext + context, + ListPluginInstancesResponse response) { + super(context, response); + } + + private static ListPluginInstancesPage createEmptyPage() { + return new ListPluginInstancesPage(null, null); + } + + @Override + protected ListPluginInstancesPage createPage( + PageContext + context, + ListPluginInstancesResponse response) { + return new ListPluginInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPluginInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + PluginInstance, + ListPluginInstancesPage, + ListPluginInstancesFixedSizeCollection> { + + private ListPluginInstancesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPluginInstancesFixedSizeCollection createEmptyCollection() { + return new ListPluginInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListPluginInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPluginInstancesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginSettings.java index 923bf37ca092..2c3172243691 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubPluginSettings.java @@ -17,6 +17,8 @@ package com.google.cloud.apihub.v1; import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListLocationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginInstancesPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.gax.core.GoogleCredentialsProvider; @@ -25,6 +27,7 @@ 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.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -33,6 +36,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -85,6 +90,31 @@ * Please refer to the [Client Side Retry * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for * additional support in setting retries. + * + *

    To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for deletePlugin: + * + *

    {@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
    + * ApiHubPluginSettings.Builder apiHubPluginSettingsBuilder = ApiHubPluginSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * apiHubPluginSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    */ @Generated("by gapic-generator-java") public class ApiHubPluginSettings extends ClientSettings { @@ -104,6 +134,114 @@ public UnaryCallSettings disablePluginSettings() { return ((ApiHubPluginStubSettings) getStubSettings()).disablePluginSettings(); } + /** Returns the object with the settings used for calls to createPlugin. */ + public UnaryCallSettings createPluginSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).createPluginSettings(); + } + + /** Returns the object with the settings used for calls to listPlugins. */ + public PagedCallSettings + listPluginsSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).listPluginsSettings(); + } + + /** Returns the object with the settings used for calls to deletePlugin. */ + public UnaryCallSettings deletePluginSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).deletePluginSettings(); + } + + /** Returns the object with the settings used for calls to deletePlugin. */ + public OperationCallSettings + deletePluginOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).deletePluginOperationSettings(); + } + + /** Returns the object with the settings used for calls to createPluginInstance. */ + public UnaryCallSettings createPluginInstanceSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).createPluginInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createPluginInstance. */ + public OperationCallSettings + createPluginInstanceOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).createPluginInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to executePluginInstanceAction. */ + public UnaryCallSettings + executePluginInstanceActionSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).executePluginInstanceActionSettings(); + } + + /** Returns the object with the settings used for calls to executePluginInstanceAction. */ + public OperationCallSettings< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()) + .executePluginInstanceActionOperationSettings(); + } + + /** Returns the object with the settings used for calls to getPluginInstance. */ + public UnaryCallSettings getPluginInstanceSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).getPluginInstanceSettings(); + } + + /** Returns the object with the settings used for calls to listPluginInstances. */ + public PagedCallSettings< + ListPluginInstancesRequest, ListPluginInstancesResponse, ListPluginInstancesPagedResponse> + listPluginInstancesSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).listPluginInstancesSettings(); + } + + /** Returns the object with the settings used for calls to enablePluginInstanceAction. */ + public UnaryCallSettings + enablePluginInstanceActionSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).enablePluginInstanceActionSettings(); + } + + /** Returns the object with the settings used for calls to enablePluginInstanceAction. */ + public OperationCallSettings< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()) + .enablePluginInstanceActionOperationSettings(); + } + + /** Returns the object with the settings used for calls to disablePluginInstanceAction. */ + public UnaryCallSettings + disablePluginInstanceActionSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).disablePluginInstanceActionSettings(); + } + + /** Returns the object with the settings used for calls to disablePluginInstanceAction. */ + public OperationCallSettings< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()) + .disablePluginInstanceActionOperationSettings(); + } + + /** Returns the object with the settings used for calls to updatePluginInstance. */ + public UnaryCallSettings + updatePluginInstanceSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).updatePluginInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deletePluginInstance. */ + public UnaryCallSettings deletePluginInstanceSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).deletePluginInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deletePluginInstance. */ + public OperationCallSettings + deletePluginInstanceOperationSettings() { + return ((ApiHubPluginStubSettings) getStubSettings()).deletePluginInstanceOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -227,6 +365,120 @@ public UnaryCallSettings.Builder disablePluginSett return getStubSettingsBuilder().disablePluginSettings(); } + /** Returns the builder for the settings used for calls to createPlugin. */ + public UnaryCallSettings.Builder createPluginSettings() { + return getStubSettingsBuilder().createPluginSettings(); + } + + /** Returns the builder for the settings used for calls to listPlugins. */ + public PagedCallSettings.Builder< + ListPluginsRequest, ListPluginsResponse, ListPluginsPagedResponse> + listPluginsSettings() { + return getStubSettingsBuilder().listPluginsSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlugin. */ + public UnaryCallSettings.Builder deletePluginSettings() { + return getStubSettingsBuilder().deletePluginSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlugin. */ + public OperationCallSettings.Builder + deletePluginOperationSettings() { + return getStubSettingsBuilder().deletePluginOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createPluginInstance. */ + public UnaryCallSettings.Builder + createPluginInstanceSettings() { + return getStubSettingsBuilder().createPluginInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createPluginInstance. */ + public OperationCallSettings.Builder< + CreatePluginInstanceRequest, PluginInstance, OperationMetadata> + createPluginInstanceOperationSettings() { + return getStubSettingsBuilder().createPluginInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to executePluginInstanceAction. */ + public UnaryCallSettings.Builder + executePluginInstanceActionSettings() { + return getStubSettingsBuilder().executePluginInstanceActionSettings(); + } + + /** Returns the builder for the settings used for calls to executePluginInstanceAction. */ + public OperationCallSettings.Builder< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings() { + return getStubSettingsBuilder().executePluginInstanceActionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getPluginInstance. */ + public UnaryCallSettings.Builder + getPluginInstanceSettings() { + return getStubSettingsBuilder().getPluginInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to listPluginInstances. */ + public PagedCallSettings.Builder< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + ListPluginInstancesPagedResponse> + listPluginInstancesSettings() { + return getStubSettingsBuilder().listPluginInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to enablePluginInstanceAction. */ + public UnaryCallSettings.Builder + enablePluginInstanceActionSettings() { + return getStubSettingsBuilder().enablePluginInstanceActionSettings(); + } + + /** Returns the builder for the settings used for calls to enablePluginInstanceAction. */ + public OperationCallSettings.Builder< + EnablePluginInstanceActionRequest, + EnablePluginInstanceActionResponse, + OperationMetadata> + enablePluginInstanceActionOperationSettings() { + return getStubSettingsBuilder().enablePluginInstanceActionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to disablePluginInstanceAction. */ + public UnaryCallSettings.Builder + disablePluginInstanceActionSettings() { + return getStubSettingsBuilder().disablePluginInstanceActionSettings(); + } + + /** Returns the builder for the settings used for calls to disablePluginInstanceAction. */ + public OperationCallSettings.Builder< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings() { + return getStubSettingsBuilder().disablePluginInstanceActionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updatePluginInstance. */ + public UnaryCallSettings.Builder + updatePluginInstanceSettings() { + return getStubSettingsBuilder().updatePluginInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deletePluginInstance. */ + public UnaryCallSettings.Builder + deletePluginInstanceSettings() { + return getStubSettingsBuilder().deletePluginInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deletePluginInstance. */ + public OperationCallSettings.Builder + deletePluginInstanceOperationSettings() { + return getStubSettingsBuilder().deletePluginInstanceOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubSettings.java index b6034a9fcbf1..d8d2be6f6aa4 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ApiHubSettings.java @@ -181,6 +181,11 @@ public UnaryCallSettings deleteSpecSettings() { return ((ApiHubStubSettings) getStubSettings()).deleteSpecSettings(); } + /** Returns the object with the settings used for calls to createApi. */ + public UnaryCallSettings createApiOperationSettings() { + return ((ApiHubStubSettings) getStubSettings()).createApiOperationSettings(); + } + /** Returns the object with the settings used for calls to getApi. */ public UnaryCallSettings getApiOperationSettings() { return ((ApiHubStubSettings) getStubSettings()).getApiOperationSettings(); @@ -193,6 +198,16 @@ public UnaryCallSettings getApiOperationSe return ((ApiHubStubSettings) getStubSettings()).listApiOperationsSettings(); } + /** Returns the object with the settings used for calls to updateApi. */ + public UnaryCallSettings updateApiOperationSettings() { + return ((ApiHubStubSettings) getStubSettings()).updateApiOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteApi. */ + public UnaryCallSettings deleteApiOperationSettings() { + return ((ApiHubStubSettings) getStubSettings()).deleteApiOperationSettings(); + } + /** Returns the object with the settings used for calls to getDefinition. */ public UnaryCallSettings getDefinitionSettings() { return ((ApiHubStubSettings) getStubSettings()).getDefinitionSettings(); @@ -478,6 +493,12 @@ public UnaryCallSettings.Builder deleteSpecSettings() return getStubSettingsBuilder().deleteSpecSettings(); } + /** Returns the builder for the settings used for calls to createApi. */ + public UnaryCallSettings.Builder + createApiOperationSettings() { + return getStubSettingsBuilder().createApiOperationSettings(); + } + /** Returns the builder for the settings used for calls to getApi. */ public UnaryCallSettings.Builder getApiOperationSettings() { @@ -491,6 +512,18 @@ public UnaryCallSettings.Builder deleteSpecSettings() return getStubSettingsBuilder().listApiOperationsSettings(); } + /** Returns the builder for the settings used for calls to updateApi. */ + public UnaryCallSettings.Builder + updateApiOperationSettings() { + return getStubSettingsBuilder().updateApiOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApi. */ + public UnaryCallSettings.Builder + deleteApiOperationSettings() { + return getStubSettingsBuilder().deleteApiOperationSettings(); + } + /** Returns the builder for the settings used for calls to getDefinition. */ public UnaryCallSettings.Builder getDefinitionSettings() { return getStubSettingsBuilder().getDefinitionSettings(); diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningClient.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningClient.java index 0647271ca684..0ee29e6df98a 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningClient.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningClient.java @@ -35,6 +35,7 @@ import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; @@ -92,6 +93,26 @@ * * * + *

    DeleteApiHubInstance + *

    Deletes the API hub instance. + * + *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    + *
      + *
    • deleteApiHubInstanceAsync(DeleteApiHubInstanceRequest request) + *

    + *

    Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

    + *
      + *
    • deleteApiHubInstanceAsync(ApiHubInstanceName name) + *

    • deleteApiHubInstanceAsync(String name) + *

    + *

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    + *
      + *
    • deleteApiHubInstanceOperationCallable() + *

    • deleteApiHubInstanceCallable() + *

    + * + * + * *

    GetApiHubInstance *

    Gets details of a single API Hub instance. * @@ -438,6 +459,157 @@ public final OperationFuture createApiHubInst return stub.createApiHubInstanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the API hub instance. + * + *

    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 (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
    +   *   ApiHubInstanceName name =
    +   *       ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
    +   *   provisioningClient.deleteApiHubInstanceAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the Api Hub instance to delete. Format: + * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApiHubInstanceAsync( + ApiHubInstanceName name) { + DeleteApiHubInstanceRequest request = + DeleteApiHubInstanceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteApiHubInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the API hub instance. + * + *

    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 (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
    +   *   String name =
    +   *       ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString();
    +   *   provisioningClient.deleteApiHubInstanceAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The name of the Api Hub instance to delete. Format: + * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApiHubInstanceAsync(String name) { + DeleteApiHubInstanceRequest request = + DeleteApiHubInstanceRequest.newBuilder().setName(name).build(); + return deleteApiHubInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the API hub instance. + * + *

    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 (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
    +   *   DeleteApiHubInstanceRequest request =
    +   *       DeleteApiHubInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
    +   *           .build();
    +   *   provisioningClient.deleteApiHubInstanceAsync(request).get();
    +   * }
    +   * }
    + * + * @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 OperationFuture deleteApiHubInstanceAsync( + DeleteApiHubInstanceRequest request) { + return deleteApiHubInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the API hub instance. + * + *

    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 (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
    +   *   DeleteApiHubInstanceRequest request =
    +   *       DeleteApiHubInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       provisioningClient.deleteApiHubInstanceOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + deleteApiHubInstanceOperationCallable() { + return stub.deleteApiHubInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the API hub instance. + * + *

    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 (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
    +   *   DeleteApiHubInstanceRequest request =
    +   *       DeleteApiHubInstanceRequest.newBuilder()
    +   *           .setName(
    +   *               ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]").toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       provisioningClient.deleteApiHubInstanceCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + deleteApiHubInstanceCallable() { + return stub.deleteApiHubInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single API Hub instance. diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningSettings.java index 7769c8da951f..f2df2da5157c 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/ProvisioningSettings.java @@ -35,6 +35,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -127,6 +128,17 @@ public UnaryCallSettings createApiHubIns return ((ProvisioningStubSettings) getStubSettings()).createApiHubInstanceOperationSettings(); } + /** Returns the object with the settings used for calls to deleteApiHubInstance. */ + public UnaryCallSettings deleteApiHubInstanceSettings() { + return ((ProvisioningStubSettings) getStubSettings()).deleteApiHubInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteApiHubInstance. */ + public OperationCallSettings + deleteApiHubInstanceOperationSettings() { + return ((ProvisioningStubSettings) getStubSettings()).deleteApiHubInstanceOperationSettings(); + } + /** Returns the object with the settings used for calls to getApiHubInstance. */ public UnaryCallSettings getApiHubInstanceSettings() { return ((ProvisioningStubSettings) getStubSettings()).getApiHubInstanceSettings(); @@ -259,6 +271,18 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().createApiHubInstanceOperationSettings(); } + /** Returns the builder for the settings used for calls to deleteApiHubInstance. */ + public UnaryCallSettings.Builder + deleteApiHubInstanceSettings() { + return getStubSettingsBuilder().deleteApiHubInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApiHubInstance. */ + public OperationCallSettings.Builder + deleteApiHubInstanceOperationSettings() { + return getStubSettingsBuilder().deleteApiHubInstanceOperationSettings(); + } + /** Returns the builder for the settings used for calls to getApiHubInstance. */ public UnaryCallSettings.Builder getApiHubInstanceSettings() { diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/gapic_metadata.json b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/gapic_metadata.json index f19b1ef5e890..c227041503f8 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/gapic_metadata.json +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/gapic_metadata.json @@ -13,6 +13,9 @@ "CreateApi": { "methods": ["createApi", "createApi", "createApi", "createApiCallable"] }, + "CreateApiOperation": { + "methods": ["createApiOperation", "createApiOperation", "createApiOperation", "createApiOperationCallable"] + }, "CreateAttribute": { "methods": ["createAttribute", "createAttribute", "createAttribute", "createAttributeCallable"] }, @@ -31,6 +34,9 @@ "DeleteApi": { "methods": ["deleteApi", "deleteApi", "deleteApi", "deleteApiCallable"] }, + "DeleteApiOperation": { + "methods": ["deleteApiOperation", "deleteApiOperation", "deleteApiOperation", "deleteApiOperationCallable"] + }, "DeleteAttribute": { "methods": ["deleteAttribute", "deleteAttribute", "deleteAttribute", "deleteAttributeCallable"] }, @@ -106,6 +112,9 @@ "UpdateApi": { "methods": ["updateApi", "updateApi", "updateApiCallable"] }, + "UpdateApiOperation": { + "methods": ["updateApiOperation", "updateApiOperation", "updateApiOperationCallable"] + }, "UpdateAttribute": { "methods": ["updateAttribute", "updateAttribute", "updateAttributeCallable"] }, @@ -155,6 +164,81 @@ } } }, + "ApiHubCollect": { + "clients": { + "grpc": { + "libraryClient": "ApiHubCollectClient", + "rpcs": { + "CollectApiData": { + "methods": ["collectApiDataAsync", "collectApiDataAsync", "collectApiDataAsync", "collectApiDataOperationCallable", "collectApiDataCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + } + } + } + } + }, + "ApiHubCurate": { + "clients": { + "grpc": { + "libraryClient": "ApiHubCurateClient", + "rpcs": { + "CreateCuration": { + "methods": ["createCuration", "createCuration", "createCuration", "createCurationCallable"] + }, + "DeleteCuration": { + "methods": ["deleteCuration", "deleteCuration", "deleteCuration", "deleteCurationCallable"] + }, + "GetCuration": { + "methods": ["getCuration", "getCuration", "getCuration", "getCurationCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListCurations": { + "methods": ["listCurations", "listCurations", "listCurations", "listCurationsPagedCallable", "listCurationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateCuration": { + "methods": ["updateCuration", "updateCuration", "updateCurationCallable"] + } + } + } + } + }, + "ApiHubDiscovery": { + "clients": { + "grpc": { + "libraryClient": "ApiHubDiscoveryClient", + "rpcs": { + "GetDiscoveredApiObservation": { + "methods": ["getDiscoveredApiObservation", "getDiscoveredApiObservation", "getDiscoveredApiObservation", "getDiscoveredApiObservationCallable"] + }, + "GetDiscoveredApiOperation": { + "methods": ["getDiscoveredApiOperation", "getDiscoveredApiOperation", "getDiscoveredApiOperation", "getDiscoveredApiOperationCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListDiscoveredApiObservations": { + "methods": ["listDiscoveredApiObservations", "listDiscoveredApiObservations", "listDiscoveredApiObservations", "listDiscoveredApiObservationsPagedCallable", "listDiscoveredApiObservationsCallable"] + }, + "ListDiscoveredApiOperations": { + "methods": ["listDiscoveredApiOperations", "listDiscoveredApiOperations", "listDiscoveredApiOperations", "listDiscoveredApiOperationsPagedCallable", "listDiscoveredApiOperationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + } + } + } + } + }, "HostProjectRegistrationService": { "clients": { "grpc": { @@ -211,20 +295,53 @@ "grpc": { "libraryClient": "ApiHubPluginClient", "rpcs": { + "CreatePlugin": { + "methods": ["createPlugin", "createPlugin", "createPlugin", "createPluginCallable"] + }, + "CreatePluginInstance": { + "methods": ["createPluginInstanceAsync", "createPluginInstanceAsync", "createPluginInstanceAsync", "createPluginInstanceOperationCallable", "createPluginInstanceCallable"] + }, + "DeletePlugin": { + "methods": ["deletePluginAsync", "deletePluginAsync", "deletePluginAsync", "deletePluginOperationCallable", "deletePluginCallable"] + }, + "DeletePluginInstance": { + "methods": ["deletePluginInstanceAsync", "deletePluginInstanceAsync", "deletePluginInstanceAsync", "deletePluginInstanceOperationCallable", "deletePluginInstanceCallable"] + }, "DisablePlugin": { "methods": ["disablePlugin", "disablePlugin", "disablePlugin", "disablePluginCallable"] }, + "DisablePluginInstanceAction": { + "methods": ["disablePluginInstanceActionAsync", "disablePluginInstanceActionAsync", "disablePluginInstanceActionAsync", "disablePluginInstanceActionOperationCallable", "disablePluginInstanceActionCallable"] + }, "EnablePlugin": { "methods": ["enablePlugin", "enablePlugin", "enablePlugin", "enablePluginCallable"] }, + "EnablePluginInstanceAction": { + "methods": ["enablePluginInstanceActionAsync", "enablePluginInstanceActionAsync", "enablePluginInstanceActionAsync", "enablePluginInstanceActionOperationCallable", "enablePluginInstanceActionCallable"] + }, + "ExecutePluginInstanceAction": { + "methods": ["executePluginInstanceActionAsync", "executePluginInstanceActionAsync", "executePluginInstanceActionAsync", "executePluginInstanceActionOperationCallable", "executePluginInstanceActionCallable"] + }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, "GetPlugin": { "methods": ["getPlugin", "getPlugin", "getPlugin", "getPluginCallable"] }, + "GetPluginInstance": { + "methods": ["getPluginInstance", "getPluginInstance", "getPluginInstance", "getPluginInstanceCallable"] + }, "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPluginInstances": { + "methods": ["listPluginInstances", "listPluginInstances", "listPluginInstances", "listPluginInstancesPagedCallable", "listPluginInstancesCallable"] + }, + "ListPlugins": { + "methods": ["listPlugins", "listPlugins", "listPlugins", "listPluginsPagedCallable", "listPluginsCallable"] + }, + "UpdatePluginInstance": { + "methods": ["updatePluginInstance", "updatePluginInstance", "updatePluginInstanceCallable"] } } } @@ -238,6 +355,9 @@ "CreateApiHubInstance": { "methods": ["createApiHubInstanceAsync", "createApiHubInstanceAsync", "createApiHubInstanceAsync", "createApiHubInstanceOperationCallable", "createApiHubInstanceCallable"] }, + "DeleteApiHubInstance": { + "methods": ["deleteApiHubInstanceAsync", "deleteApiHubInstanceAsync", "deleteApiHubInstanceAsync", "deleteApiHubInstanceOperationCallable", "deleteApiHubInstanceCallable"] + }, "GetApiHubInstance": { "methods": ["getApiHubInstance", "getApiHubInstance", "getApiHubInstance", "getApiHubInstanceCallable"] }, diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/package-info.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/package-info.java index 79e4fe3ea07b..b9ac8a56622b 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/package-info.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/package-info.java @@ -61,6 +61,67 @@ * } * } * + *

    ======================= ApiHubCollectClient ======================= + * + *

    Service Description: This service exposes methods used for collecting various types of data + * from different first party and third party sources and push it to Hub's collect layer. + * + *

    Sample for ApiHubCollectClient: + * + *

    {@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 (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
    + *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
    + *   Location response = apiHubCollectClient.getLocation(request);
    + * }
    + * }
    + * + *

    ======================= ApiHubCurateClient ======================= + * + *

    Service Description: This service is used for managing curations for processing API data + * consumed from collect layer. + * + *

    Sample for ApiHubCurateClient: + * + *

    {@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 (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
    + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    + *   Curation curation = Curation.newBuilder().build();
    + *   String curationId = "curationId1428017328";
    + *   Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
    + * }
    + * }
    + * + *

    ======================= ApiHubDiscoveryClient ======================= + * + *

    Service Description: This service exposes methods used to manage DiscoveredApiObservations and + * DiscoveredApiOperations. + * + *

    Sample for ApiHubDiscoveryClient: + * + *

    {@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 (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
    + *   DiscoveredApiObservationName name =
    + *       DiscoveredApiObservationName.of(
    + *           "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
    + *   DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
    + * }
    + * }
    + * *

    ======================= HostProjectRegistrationServiceClient ======================= * *

    Service Description: This service is used for managing the host project registrations. diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java new file mode 100644 index 000000000000..d3e030b633c9 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStub.java @@ -0,0 +1,72 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CollectApiDataRequest; +import com.google.cloud.apihub.v1.CollectApiDataResponse; +import com.google.cloud.apihub.v1.OperationMetadata; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ApiHubCollect service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ApiHubCollectStub implements BackgroundResource { + + public OperationsStub getHttpJsonOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getHttpJsonOperationsStub()"); + } + + public OperationCallable + collectApiDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: collectApiDataOperationCallable()"); + } + + public UnaryCallable collectApiDataCallable() { + throw new UnsupportedOperationException("Not implemented: collectApiDataCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStubSettings.java new file mode 100644 index 000000000000..33f6981dd173 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCollectStubSettings.java @@ -0,0 +1,478 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ObsoleteApi; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.httpjson.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +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.OperationCallSettings; +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.apihub.v1.CollectApiDataRequest; +import com.google.cloud.apihub.v1.CollectApiDataResponse; +import com.google.cloud.apihub.v1.OperationMetadata; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ApiHubCollectStub}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getLocation: + * + *

    {@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
    + * ApiHubCollectStubSettings.Builder apiHubCollectSettingsBuilder =
    + *     ApiHubCollectStubSettings.newBuilder();
    + * apiHubCollectSettingsBuilder
    + *     .getLocationSettings()
    + *     .setRetrySettings(
    + *         apiHubCollectSettingsBuilder
    + *             .getLocationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubCollectStubSettings apiHubCollectSettings = apiHubCollectSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + * + *

    To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for collectApiData: + * + *

    {@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
    + * ApiHubCollectStubSettings.Builder apiHubCollectSettingsBuilder =
    + *     ApiHubCollectStubSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * apiHubCollectSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class ApiHubCollectStubSettings 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 collectApiDataSettings; + private final OperationCallSettings< + CollectApiDataRequest, CollectApiDataResponse, OperationMetadata> + collectApiDataOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to collectApiData. */ + public UnaryCallSettings collectApiDataSettings() { + return collectApiDataSettings; + } + + /** Returns the object with the settings used for calls to collectApiData. */ + public OperationCallSettings + collectApiDataOperationSettings() { + return collectApiDataOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ApiHubCollectStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonApiHubCollectStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "apihub"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "apihub.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "apihub.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 ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ApiHubCollectStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubCollectStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + collectApiDataSettings = settingsBuilder.collectApiDataSettings().build(); + collectApiDataOperationSettings = settingsBuilder.collectApiDataOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ApiHubCollectStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + collectApiDataSettings; + private final OperationCallSettings.Builder< + CollectApiDataRequest, CollectApiDataResponse, OperationMetadata> + collectApiDataOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + collectApiDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + collectApiDataOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + collectApiDataSettings, listLocationsSettings, getLocationSettings); + initDefaults(this); + } + + protected Builder(ApiHubCollectStubSettings settings) { + super(settings); + + collectApiDataSettings = settings.collectApiDataSettings.toBuilder(); + collectApiDataOperationSettings = settings.collectApiDataOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + collectApiDataSettings, listLocationsSettings, getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .collectApiDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .collectApiDataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CollectApiDataResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + 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 collectApiData. */ + public UnaryCallSettings.Builder collectApiDataSettings() { + return collectApiDataSettings; + } + + /** Returns the builder for the settings used for calls to collectApiData. */ + public OperationCallSettings.Builder< + CollectApiDataRequest, CollectApiDataResponse, OperationMetadata> + collectApiDataOperationSettings() { + return collectApiDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ApiHubCollectStubSettings build() throws IOException { + return new ApiHubCollectStubSettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStub.java new file mode 100644 index 000000000000..2298d5e91c6e --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStub.java @@ -0,0 +1,87 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListCurationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CreateCurationRequest; +import com.google.cloud.apihub.v1.Curation; +import com.google.cloud.apihub.v1.DeleteCurationRequest; +import com.google.cloud.apihub.v1.GetCurationRequest; +import com.google.cloud.apihub.v1.ListCurationsRequest; +import com.google.cloud.apihub.v1.ListCurationsResponse; +import com.google.cloud.apihub.v1.UpdateCurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ApiHubCurate service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ApiHubCurateStub implements BackgroundResource { + + public UnaryCallable createCurationCallable() { + throw new UnsupportedOperationException("Not implemented: createCurationCallable()"); + } + + public UnaryCallable getCurationCallable() { + throw new UnsupportedOperationException("Not implemented: getCurationCallable()"); + } + + public UnaryCallable + listCurationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCurationsPagedCallable()"); + } + + public UnaryCallable listCurationsCallable() { + throw new UnsupportedOperationException("Not implemented: listCurationsCallable()"); + } + + public UnaryCallable updateCurationCallable() { + throw new UnsupportedOperationException("Not implemented: updateCurationCallable()"); + } + + public UnaryCallable deleteCurationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCurationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStubSettings.java new file mode 100644 index 000000000000..fb952392d1f6 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubCurateStubSettings.java @@ -0,0 +1,555 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListCurationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ObsoleteApi; +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.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.apihub.v1.CreateCurationRequest; +import com.google.cloud.apihub.v1.Curation; +import com.google.cloud.apihub.v1.DeleteCurationRequest; +import com.google.cloud.apihub.v1.GetCurationRequest; +import com.google.cloud.apihub.v1.ListCurationsRequest; +import com.google.cloud.apihub.v1.ListCurationsResponse; +import com.google.cloud.apihub.v1.UpdateCurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.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 ApiHubCurateStub}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createCuration: + * + *

    {@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
    + * ApiHubCurateStubSettings.Builder apiHubCurateSettingsBuilder =
    + *     ApiHubCurateStubSettings.newBuilder();
    + * apiHubCurateSettingsBuilder
    + *     .createCurationSettings()
    + *     .setRetrySettings(
    + *         apiHubCurateSettingsBuilder
    + *             .createCurationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubCurateStubSettings apiHubCurateSettings = apiHubCurateSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class ApiHubCurateStubSettings 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 createCurationSettings; + private final UnaryCallSettings getCurationSettings; + private final PagedCallSettings< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse> + listCurationsSettings; + private final UnaryCallSettings updateCurationSettings; + private final UnaryCallSettings deleteCurationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_CURATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCurationsRequest injectToken(ListCurationsRequest payload, String token) { + return ListCurationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCurationsRequest injectPageSize(ListCurationsRequest payload, int pageSize) { + return ListCurationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCurationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCurationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCurationsResponse payload) { + return payload.getCurationsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse> + LIST_CURATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCurationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CURATIONS_PAGE_STR_DESC, request, context); + return ListCurationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createCuration. */ + public UnaryCallSettings createCurationSettings() { + return createCurationSettings; + } + + /** Returns the object with the settings used for calls to getCuration. */ + public UnaryCallSettings getCurationSettings() { + return getCurationSettings; + } + + /** Returns the object with the settings used for calls to listCurations. */ + public PagedCallSettings + listCurationsSettings() { + return listCurationsSettings; + } + + /** Returns the object with the settings used for calls to updateCuration. */ + public UnaryCallSettings updateCurationSettings() { + return updateCurationSettings; + } + + /** Returns the object with the settings used for calls to deleteCuration. */ + public UnaryCallSettings deleteCurationSettings() { + return deleteCurationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ApiHubCurateStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonApiHubCurateStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "apihub"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "apihub.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "apihub.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 ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ApiHubCurateStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubCurateStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createCurationSettings = settingsBuilder.createCurationSettings().build(); + getCurationSettings = settingsBuilder.getCurationSettings().build(); + listCurationsSettings = settingsBuilder.listCurationsSettings().build(); + updateCurationSettings = settingsBuilder.updateCurationSettings().build(); + deleteCurationSettings = settingsBuilder.deleteCurationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ApiHubCurateStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createCurationSettings; + private final UnaryCallSettings.Builder getCurationSettings; + private final PagedCallSettings.Builder< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse> + listCurationsSettings; + private final UnaryCallSettings.Builder updateCurationSettings; + private final UnaryCallSettings.Builder deleteCurationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createCurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getCurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCurationsSettings = PagedCallSettings.newBuilder(LIST_CURATIONS_PAGE_STR_FACT); + updateCurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCurationSettings, + getCurationSettings, + listCurationsSettings, + updateCurationSettings, + deleteCurationSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ApiHubCurateStubSettings settings) { + super(settings); + + createCurationSettings = settings.createCurationSettings.toBuilder(); + getCurationSettings = settings.getCurationSettings.toBuilder(); + listCurationsSettings = settings.listCurationsSettings.toBuilder(); + updateCurationSettings = settings.updateCurationSettings.toBuilder(); + deleteCurationSettings = settings.deleteCurationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCurationSettings, + getCurationSettings, + listCurationsSettings, + updateCurationSettings, + deleteCurationSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createCurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getCurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listCurationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateCurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteCurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 createCuration. */ + public UnaryCallSettings.Builder createCurationSettings() { + return createCurationSettings; + } + + /** Returns the builder for the settings used for calls to getCuration. */ + public UnaryCallSettings.Builder getCurationSettings() { + return getCurationSettings; + } + + /** Returns the builder for the settings used for calls to listCurations. */ + public PagedCallSettings.Builder< + ListCurationsRequest, ListCurationsResponse, ListCurationsPagedResponse> + listCurationsSettings() { + return listCurationsSettings; + } + + /** Returns the builder for the settings used for calls to updateCuration. */ + public UnaryCallSettings.Builder updateCurationSettings() { + return updateCurationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCuration. */ + public UnaryCallSettings.Builder deleteCurationSettings() { + return deleteCurationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ApiHubCurateStubSettings build() throws IOException { + return new ApiHubCurateStubSettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStub.java new file mode 100644 index 000000000000..2ee0d330789c --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStub.java @@ -0,0 +1,99 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.DiscoveredApiObservation; +import com.google.cloud.apihub.v1.DiscoveredApiOperation; +import com.google.cloud.apihub.v1.GetDiscoveredApiObservationRequest; +import com.google.cloud.apihub.v1.GetDiscoveredApiOperationRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsResponse; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ApiHubDiscovery service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ApiHubDiscoveryStub implements BackgroundResource { + + public UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDiscoveredApiObservationsPagedCallable()"); + } + + public UnaryCallable + listDiscoveredApiObservationsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDiscoveredApiObservationsCallable()"); + } + + public UnaryCallable + getDiscoveredApiObservationCallable() { + throw new UnsupportedOperationException( + "Not implemented: getDiscoveredApiObservationCallable()"); + } + + public UnaryCallable + listDiscoveredApiOperationsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDiscoveredApiOperationsPagedCallable()"); + } + + public UnaryCallable + listDiscoveredApiOperationsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDiscoveredApiOperationsCallable()"); + } + + public UnaryCallable + getDiscoveredApiOperationCallable() { + throw new UnsupportedOperationException("Not implemented: getDiscoveredApiOperationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStubSettings.java new file mode 100644 index 000000000000..2ea67d64977a --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubDiscoveryStubSettings.java @@ -0,0 +1,681 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ObsoleteApi; +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.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.apihub.v1.DiscoveredApiObservation; +import com.google.cloud.apihub.v1.DiscoveredApiOperation; +import com.google.cloud.apihub.v1.GetDiscoveredApiObservationRequest; +import com.google.cloud.apihub.v1.GetDiscoveredApiOperationRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsResponse; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ApiHubDiscoveryStub}. + * + *

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

      + *
    • The default service address (apihub.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDiscoveredApiObservation: + * + *

    {@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
    + * ApiHubDiscoveryStubSettings.Builder apiHubDiscoverySettingsBuilder =
    + *     ApiHubDiscoveryStubSettings.newBuilder();
    + * apiHubDiscoverySettingsBuilder
    + *     .getDiscoveredApiObservationSettings()
    + *     .setRetrySettings(
    + *         apiHubDiscoverySettingsBuilder
    + *             .getDiscoveredApiObservationSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * ApiHubDiscoveryStubSettings apiHubDiscoverySettings = apiHubDiscoverySettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class ApiHubDiscoveryStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings; + private final UnaryCallSettings + getDiscoveredApiObservationSettings; + private final PagedCallSettings< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings; + private final UnaryCallSettings + getDiscoveredApiOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + LIST_DISCOVERED_API_OBSERVATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDiscoveredApiObservationsRequest injectToken( + ListDiscoveredApiObservationsRequest payload, String token) { + return ListDiscoveredApiObservationsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListDiscoveredApiObservationsRequest injectPageSize( + ListDiscoveredApiObservationsRequest payload, int pageSize) { + return ListDiscoveredApiObservationsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDiscoveredApiObservationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDiscoveredApiObservationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDiscoveredApiObservationsResponse payload) { + return payload.getDiscoveredApiObservationsList(); + } + }; + + private static final PagedListDescriptor< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + LIST_DISCOVERED_API_OPERATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDiscoveredApiOperationsRequest injectToken( + ListDiscoveredApiOperationsRequest payload, String token) { + return ListDiscoveredApiOperationsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListDiscoveredApiOperationsRequest injectPageSize( + ListDiscoveredApiOperationsRequest payload, int pageSize) { + return ListDiscoveredApiOperationsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDiscoveredApiOperationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDiscoveredApiOperationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDiscoveredApiOperationsResponse payload) { + return payload.getDiscoveredApiOperationsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + LIST_DISCOVERED_API_OBSERVATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse> + callable, + ListDiscoveredApiObservationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + DiscoveredApiObservation> + pageContext = + PageContext.create( + callable, + LIST_DISCOVERED_API_OBSERVATIONS_PAGE_STR_DESC, + request, + context); + return ListDiscoveredApiObservationsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + LIST_DISCOVERED_API_OPERATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsResponse> + callable, + ListDiscoveredApiOperationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + DiscoveredApiOperation> + pageContext = + PageContext.create( + callable, LIST_DISCOVERED_API_OPERATIONS_PAGE_STR_DESC, request, context); + return ListDiscoveredApiOperationsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDiscoveredApiObservations. */ + public PagedCallSettings< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings() { + return listDiscoveredApiObservationsSettings; + } + + /** Returns the object with the settings used for calls to getDiscoveredApiObservation. */ + public UnaryCallSettings + getDiscoveredApiObservationSettings() { + return getDiscoveredApiObservationSettings; + } + + /** Returns the object with the settings used for calls to listDiscoveredApiOperations. */ + public PagedCallSettings< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings() { + return listDiscoveredApiOperationsSettings; + } + + /** Returns the object with the settings used for calls to getDiscoveredApi. */ + public UnaryCallSettings + getDiscoveredApiOperationSettings() { + return getDiscoveredApiOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ApiHubDiscoveryStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonApiHubDiscoveryStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "apihub"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "apihub.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "apihub.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 ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ApiHubDiscoveryStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ApiHubDiscoveryStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDiscoveredApiObservationsSettings = + settingsBuilder.listDiscoveredApiObservationsSettings().build(); + getDiscoveredApiObservationSettings = + settingsBuilder.getDiscoveredApiObservationSettings().build(); + listDiscoveredApiOperationsSettings = + settingsBuilder.listDiscoveredApiOperationsSettings().build(); + getDiscoveredApiOperationSettings = settingsBuilder.getDiscoveredApiOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ApiHubDiscoveryStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings; + private final UnaryCallSettings.Builder< + GetDiscoveredApiObservationRequest, DiscoveredApiObservation> + getDiscoveredApiObservationSettings; + private final PagedCallSettings.Builder< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings; + private final UnaryCallSettings.Builder< + GetDiscoveredApiOperationRequest, DiscoveredApiOperation> + getDiscoveredApiOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listDiscoveredApiObservationsSettings = + PagedCallSettings.newBuilder(LIST_DISCOVERED_API_OBSERVATIONS_PAGE_STR_FACT); + getDiscoveredApiObservationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDiscoveredApiOperationsSettings = + PagedCallSettings.newBuilder(LIST_DISCOVERED_API_OPERATIONS_PAGE_STR_FACT); + getDiscoveredApiOperationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDiscoveredApiObservationsSettings, + getDiscoveredApiObservationSettings, + listDiscoveredApiOperationsSettings, + getDiscoveredApiOperationSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ApiHubDiscoveryStubSettings settings) { + super(settings); + + listDiscoveredApiObservationsSettings = + settings.listDiscoveredApiObservationsSettings.toBuilder(); + getDiscoveredApiObservationSettings = + settings.getDiscoveredApiObservationSettings.toBuilder(); + listDiscoveredApiOperationsSettings = + settings.listDiscoveredApiOperationsSettings.toBuilder(); + getDiscoveredApiOperationSettings = settings.getDiscoveredApiOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDiscoveredApiObservationsSettings, + getDiscoveredApiObservationSettings, + listDiscoveredApiOperationsSettings, + getDiscoveredApiOperationSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listDiscoveredApiObservationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDiscoveredApiObservationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDiscoveredApiOperationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDiscoveredApiOperationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 listDiscoveredApiObservations. */ + public PagedCallSettings.Builder< + ListDiscoveredApiObservationsRequest, + ListDiscoveredApiObservationsResponse, + ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsSettings() { + return listDiscoveredApiObservationsSettings; + } + + /** Returns the builder for the settings used for calls to getDiscoveredApiObservation. */ + public UnaryCallSettings.Builder + getDiscoveredApiObservationSettings() { + return getDiscoveredApiObservationSettings; + } + + /** Returns the builder for the settings used for calls to listDiscoveredApiOperations. */ + public PagedCallSettings.Builder< + ListDiscoveredApiOperationsRequest, + ListDiscoveredApiOperationsResponse, + ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsSettings() { + return listDiscoveredApiOperationsSettings; + } + + /** Returns the builder for the settings used for calls to getDiscoveredApi. */ + public UnaryCallSettings.Builder + getDiscoveredApiOperationSettings() { + return getDiscoveredApiOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public ApiHubDiscoveryStubSettings build() throws IOException { + return new ApiHubDiscoveryStubSettings(this); + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStub.java index 46bb7809cdce..e359e56fa3b7 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStub.java @@ -17,17 +17,41 @@ package com.google.cloud.apihub.v1.stub; import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListLocationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginInstancesPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginsPagedResponse; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CreatePluginInstanceRequest; +import com.google.cloud.apihub.v1.CreatePluginRequest; +import com.google.cloud.apihub.v1.DeletePluginInstanceRequest; +import com.google.cloud.apihub.v1.DeletePluginRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.DisablePluginRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.EnablePluginRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionResponse; +import com.google.cloud.apihub.v1.GetPluginInstanceRequest; import com.google.cloud.apihub.v1.GetPluginRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesResponse; +import com.google.cloud.apihub.v1.ListPluginsRequest; +import com.google.cloud.apihub.v1.ListPluginsResponse; +import com.google.cloud.apihub.v1.OperationMetadata; import com.google.cloud.apihub.v1.Plugin; +import com.google.cloud.apihub.v1.PluginInstance; +import com.google.cloud.apihub.v1.UpdatePluginInstanceRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -39,6 +63,10 @@ @Generated("by gapic-generator-java") public abstract class ApiHubPluginStub implements BackgroundResource { + public OperationsStub getHttpJsonOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getHttpJsonOperationsStub()"); + } + public UnaryCallable getPluginCallable() { throw new UnsupportedOperationException("Not implemented: getPluginCallable()"); } @@ -51,6 +79,108 @@ public UnaryCallable disablePluginCallable() { throw new UnsupportedOperationException("Not implemented: disablePluginCallable()"); } + public UnaryCallable createPluginCallable() { + throw new UnsupportedOperationException("Not implemented: createPluginCallable()"); + } + + public UnaryCallable listPluginsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPluginsPagedCallable()"); + } + + public UnaryCallable listPluginsCallable() { + throw new UnsupportedOperationException("Not implemented: listPluginsCallable()"); + } + + public OperationCallable + deletePluginOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deletePluginOperationCallable()"); + } + + public UnaryCallable deletePluginCallable() { + throw new UnsupportedOperationException("Not implemented: deletePluginCallable()"); + } + + public OperationCallable + createPluginInstanceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPluginInstanceOperationCallable()"); + } + + public UnaryCallable createPluginInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createPluginInstanceCallable()"); + } + + public OperationCallable< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: executePluginInstanceActionOperationCallable()"); + } + + public UnaryCallable + executePluginInstanceActionCallable() { + throw new UnsupportedOperationException( + "Not implemented: executePluginInstanceActionCallable()"); + } + + public UnaryCallable getPluginInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getPluginInstanceCallable()"); + } + + public UnaryCallable + listPluginInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPluginInstancesPagedCallable()"); + } + + public UnaryCallable + listPluginInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listPluginInstancesCallable()"); + } + + public OperationCallable< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: enablePluginInstanceActionOperationCallable()"); + } + + public UnaryCallable + enablePluginInstanceActionCallable() { + throw new UnsupportedOperationException( + "Not implemented: enablePluginInstanceActionCallable()"); + } + + public OperationCallable< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: disablePluginInstanceActionOperationCallable()"); + } + + public UnaryCallable + disablePluginInstanceActionCallable() { + throw new UnsupportedOperationException( + "Not implemented: disablePluginInstanceActionCallable()"); + } + + public UnaryCallable updatePluginInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: updatePluginInstanceCallable()"); + } + + public OperationCallable + deletePluginInstanceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePluginInstanceOperationCallable()"); + } + + public UnaryCallable deletePluginInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deletePluginInstanceCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStubSettings.java index f6df2b1c6c23..1ebd3b06dbd1 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStubSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubPluginStubSettings.java @@ -17,6 +17,8 @@ package com.google.cloud.apihub.v1.stub; import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListLocationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginInstancesPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -27,10 +29,14 @@ 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.httpjson.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; 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.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -40,10 +46,28 @@ 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.apihub.v1.CreatePluginInstanceRequest; +import com.google.cloud.apihub.v1.CreatePluginRequest; +import com.google.cloud.apihub.v1.DeletePluginInstanceRequest; +import com.google.cloud.apihub.v1.DeletePluginRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.DisablePluginRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.EnablePluginRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionResponse; +import com.google.cloud.apihub.v1.GetPluginInstanceRequest; import com.google.cloud.apihub.v1.GetPluginRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesResponse; +import com.google.cloud.apihub.v1.ListPluginsRequest; +import com.google.cloud.apihub.v1.ListPluginsResponse; +import com.google.cloud.apihub.v1.OperationMetadata; import com.google.cloud.apihub.v1.Plugin; +import com.google.cloud.apihub.v1.PluginInstance; +import com.google.cloud.apihub.v1.UpdatePluginInstanceRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -52,6 +76,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.time.Duration; import java.util.List; @@ -106,6 +132,32 @@ * Please refer to the [Client Side Retry * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for * additional support in setting retries. + * + *

    To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for deletePlugin: + * + *

    {@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
    + * ApiHubPluginStubSettings.Builder apiHubPluginSettingsBuilder =
    + *     ApiHubPluginStubSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * apiHubPluginSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    */ @Generated("by gapic-generator-java") public class ApiHubPluginStubSettings extends StubSettings { @@ -116,11 +168,124 @@ public class ApiHubPluginStubSettings extends StubSettings getPluginSettings; private final UnaryCallSettings enablePluginSettings; private final UnaryCallSettings disablePluginSettings; + private final UnaryCallSettings createPluginSettings; + private final PagedCallSettings + listPluginsSettings; + private final UnaryCallSettings deletePluginSettings; + private final OperationCallSettings + deletePluginOperationSettings; + private final UnaryCallSettings + createPluginInstanceSettings; + private final OperationCallSettings< + CreatePluginInstanceRequest, PluginInstance, OperationMetadata> + createPluginInstanceOperationSettings; + private final UnaryCallSettings + executePluginInstanceActionSettings; + private final OperationCallSettings< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings; + private final UnaryCallSettings + getPluginInstanceSettings; + private final PagedCallSettings< + ListPluginInstancesRequest, ListPluginInstancesResponse, ListPluginInstancesPagedResponse> + listPluginInstancesSettings; + private final UnaryCallSettings + enablePluginInstanceActionSettings; + private final OperationCallSettings< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationSettings; + private final UnaryCallSettings + disablePluginInstanceActionSettings; + private final OperationCallSettings< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings; + private final UnaryCallSettings + updatePluginInstanceSettings; + private final UnaryCallSettings + deletePluginInstanceSettings; + private final OperationCallSettings + deletePluginInstanceOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; private final UnaryCallSettings getLocationSettings; + private static final PagedListDescriptor + LIST_PLUGINS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPluginsRequest injectToken(ListPluginsRequest payload, String token) { + return ListPluginsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPluginsRequest injectPageSize(ListPluginsRequest payload, int pageSize) { + return ListPluginsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPluginsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPluginsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPluginsResponse payload) { + return payload.getPluginsList(); + } + }; + + private static final PagedListDescriptor< + ListPluginInstancesRequest, ListPluginInstancesResponse, PluginInstance> + LIST_PLUGIN_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPluginInstancesRequest, ListPluginInstancesResponse, PluginInstance>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPluginInstancesRequest injectToken( + ListPluginInstancesRequest payload, String token) { + return ListPluginInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPluginInstancesRequest injectPageSize( + ListPluginInstancesRequest payload, int pageSize) { + return ListPluginInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPluginInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPluginInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPluginInstancesResponse payload) { + return payload.getPluginInstancesList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -155,6 +320,44 @@ public Iterable extractResources(ListLocationsResponse payload) { } }; + private static final PagedListResponseFactory< + ListPluginsRequest, ListPluginsResponse, ListPluginsPagedResponse> + LIST_PLUGINS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPluginsRequest, ListPluginsResponse, ListPluginsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPluginsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PLUGINS_PAGE_STR_DESC, request, context); + return ListPluginsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPluginInstancesRequest, ListPluginInstancesResponse, ListPluginInstancesPagedResponse> + LIST_PLUGIN_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + ListPluginInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPluginInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PLUGIN_INSTANCES_PAGE_STR_DESC, request, context); + return ListPluginInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -187,6 +390,111 @@ public UnaryCallSettings disablePluginSettings() { return disablePluginSettings; } + /** Returns the object with the settings used for calls to createPlugin. */ + public UnaryCallSettings createPluginSettings() { + return createPluginSettings; + } + + /** Returns the object with the settings used for calls to listPlugins. */ + public PagedCallSettings + listPluginsSettings() { + return listPluginsSettings; + } + + /** Returns the object with the settings used for calls to deletePlugin. */ + public UnaryCallSettings deletePluginSettings() { + return deletePluginSettings; + } + + /** Returns the object with the settings used for calls to deletePlugin. */ + public OperationCallSettings + deletePluginOperationSettings() { + return deletePluginOperationSettings; + } + + /** Returns the object with the settings used for calls to createPluginInstance. */ + public UnaryCallSettings createPluginInstanceSettings() { + return createPluginInstanceSettings; + } + + /** Returns the object with the settings used for calls to createPluginInstance. */ + public OperationCallSettings + createPluginInstanceOperationSettings() { + return createPluginInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to executePluginInstanceAction. */ + public UnaryCallSettings + executePluginInstanceActionSettings() { + return executePluginInstanceActionSettings; + } + + /** Returns the object with the settings used for calls to executePluginInstanceAction. */ + public OperationCallSettings< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings() { + return executePluginInstanceActionOperationSettings; + } + + /** Returns the object with the settings used for calls to getPluginInstance. */ + public UnaryCallSettings getPluginInstanceSettings() { + return getPluginInstanceSettings; + } + + /** Returns the object with the settings used for calls to listPluginInstances. */ + public PagedCallSettings< + ListPluginInstancesRequest, ListPluginInstancesResponse, ListPluginInstancesPagedResponse> + listPluginInstancesSettings() { + return listPluginInstancesSettings; + } + + /** Returns the object with the settings used for calls to enablePluginInstanceAction. */ + public UnaryCallSettings + enablePluginInstanceActionSettings() { + return enablePluginInstanceActionSettings; + } + + /** Returns the object with the settings used for calls to enablePluginInstanceAction. */ + public OperationCallSettings< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationSettings() { + return enablePluginInstanceActionOperationSettings; + } + + /** Returns the object with the settings used for calls to disablePluginInstanceAction. */ + public UnaryCallSettings + disablePluginInstanceActionSettings() { + return disablePluginInstanceActionSettings; + } + + /** Returns the object with the settings used for calls to disablePluginInstanceAction. */ + public OperationCallSettings< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings() { + return disablePluginInstanceActionOperationSettings; + } + + /** Returns the object with the settings used for calls to updatePluginInstance. */ + public UnaryCallSettings + updatePluginInstanceSettings() { + return updatePluginInstanceSettings; + } + + /** Returns the object with the settings used for calls to deletePluginInstance. */ + public UnaryCallSettings deletePluginInstanceSettings() { + return deletePluginInstanceSettings; + } + + /** Returns the object with the settings used for calls to deletePluginInstance. */ + public OperationCallSettings + deletePluginInstanceOperationSettings() { + return deletePluginInstanceOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -283,6 +591,31 @@ protected ApiHubPluginStubSettings(Builder settingsBuilder) throws IOException { getPluginSettings = settingsBuilder.getPluginSettings().build(); enablePluginSettings = settingsBuilder.enablePluginSettings().build(); disablePluginSettings = settingsBuilder.disablePluginSettings().build(); + createPluginSettings = settingsBuilder.createPluginSettings().build(); + listPluginsSettings = settingsBuilder.listPluginsSettings().build(); + deletePluginSettings = settingsBuilder.deletePluginSettings().build(); + deletePluginOperationSettings = settingsBuilder.deletePluginOperationSettings().build(); + createPluginInstanceSettings = settingsBuilder.createPluginInstanceSettings().build(); + createPluginInstanceOperationSettings = + settingsBuilder.createPluginInstanceOperationSettings().build(); + executePluginInstanceActionSettings = + settingsBuilder.executePluginInstanceActionSettings().build(); + executePluginInstanceActionOperationSettings = + settingsBuilder.executePluginInstanceActionOperationSettings().build(); + getPluginInstanceSettings = settingsBuilder.getPluginInstanceSettings().build(); + listPluginInstancesSettings = settingsBuilder.listPluginInstancesSettings().build(); + enablePluginInstanceActionSettings = + settingsBuilder.enablePluginInstanceActionSettings().build(); + enablePluginInstanceActionOperationSettings = + settingsBuilder.enablePluginInstanceActionOperationSettings().build(); + disablePluginInstanceActionSettings = + settingsBuilder.disablePluginInstanceActionSettings().build(); + disablePluginInstanceActionOperationSettings = + settingsBuilder.disablePluginInstanceActionOperationSettings().build(); + updatePluginInstanceSettings = settingsBuilder.updatePluginInstanceSettings().build(); + deletePluginInstanceSettings = settingsBuilder.deletePluginInstanceSettings().build(); + deletePluginInstanceOperationSettings = + settingsBuilder.deletePluginInstanceOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -293,6 +626,53 @@ public static class Builder extends StubSettings.Builder getPluginSettings; private final UnaryCallSettings.Builder enablePluginSettings; private final UnaryCallSettings.Builder disablePluginSettings; + private final UnaryCallSettings.Builder createPluginSettings; + private final PagedCallSettings.Builder< + ListPluginsRequest, ListPluginsResponse, ListPluginsPagedResponse> + listPluginsSettings; + private final UnaryCallSettings.Builder deletePluginSettings; + private final OperationCallSettings.Builder + deletePluginOperationSettings; + private final UnaryCallSettings.Builder + createPluginInstanceSettings; + private final OperationCallSettings.Builder< + CreatePluginInstanceRequest, PluginInstance, OperationMetadata> + createPluginInstanceOperationSettings; + private final UnaryCallSettings.Builder + executePluginInstanceActionSettings; + private final OperationCallSettings.Builder< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings; + private final UnaryCallSettings.Builder + getPluginInstanceSettings; + private final PagedCallSettings.Builder< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + ListPluginInstancesPagedResponse> + listPluginInstancesSettings; + private final UnaryCallSettings.Builder + enablePluginInstanceActionSettings; + private final OperationCallSettings.Builder< + EnablePluginInstanceActionRequest, + EnablePluginInstanceActionResponse, + OperationMetadata> + enablePluginInstanceActionOperationSettings; + private final UnaryCallSettings.Builder + disablePluginInstanceActionSettings; + private final OperationCallSettings.Builder< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings; + private final UnaryCallSettings.Builder + updatePluginInstanceSettings; + private final UnaryCallSettings.Builder + deletePluginInstanceSettings; + private final OperationCallSettings.Builder< + DeletePluginInstanceRequest, Empty, OperationMetadata> + deletePluginInstanceOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -351,6 +731,24 @@ protected Builder(ClientContext clientContext) { getPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); enablePluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); disablePluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPluginsSettings = PagedCallSettings.newBuilder(LIST_PLUGINS_PAGE_STR_FACT); + deletePluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePluginOperationSettings = OperationCallSettings.newBuilder(); + createPluginInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPluginInstanceOperationSettings = OperationCallSettings.newBuilder(); + executePluginInstanceActionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + executePluginInstanceActionOperationSettings = OperationCallSettings.newBuilder(); + getPluginInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPluginInstancesSettings = + PagedCallSettings.newBuilder(LIST_PLUGIN_INSTANCES_PAGE_STR_FACT); + enablePluginInstanceActionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + enablePluginInstanceActionOperationSettings = OperationCallSettings.newBuilder(); + disablePluginInstanceActionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + disablePluginInstanceActionOperationSettings = OperationCallSettings.newBuilder(); + updatePluginInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePluginInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePluginInstanceOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -359,6 +757,17 @@ protected Builder(ClientContext clientContext) { getPluginSettings, enablePluginSettings, disablePluginSettings, + createPluginSettings, + listPluginsSettings, + deletePluginSettings, + createPluginInstanceSettings, + executePluginInstanceActionSettings, + getPluginInstanceSettings, + listPluginInstancesSettings, + enablePluginInstanceActionSettings, + disablePluginInstanceActionSettings, + updatePluginInstanceSettings, + deletePluginInstanceSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -370,6 +779,30 @@ protected Builder(ApiHubPluginStubSettings settings) { getPluginSettings = settings.getPluginSettings.toBuilder(); enablePluginSettings = settings.enablePluginSettings.toBuilder(); disablePluginSettings = settings.disablePluginSettings.toBuilder(); + createPluginSettings = settings.createPluginSettings.toBuilder(); + listPluginsSettings = settings.listPluginsSettings.toBuilder(); + deletePluginSettings = settings.deletePluginSettings.toBuilder(); + deletePluginOperationSettings = settings.deletePluginOperationSettings.toBuilder(); + createPluginInstanceSettings = settings.createPluginInstanceSettings.toBuilder(); + createPluginInstanceOperationSettings = + settings.createPluginInstanceOperationSettings.toBuilder(); + executePluginInstanceActionSettings = + settings.executePluginInstanceActionSettings.toBuilder(); + executePluginInstanceActionOperationSettings = + settings.executePluginInstanceActionOperationSettings.toBuilder(); + getPluginInstanceSettings = settings.getPluginInstanceSettings.toBuilder(); + listPluginInstancesSettings = settings.listPluginInstancesSettings.toBuilder(); + enablePluginInstanceActionSettings = settings.enablePluginInstanceActionSettings.toBuilder(); + enablePluginInstanceActionOperationSettings = + settings.enablePluginInstanceActionOperationSettings.toBuilder(); + disablePluginInstanceActionSettings = + settings.disablePluginInstanceActionSettings.toBuilder(); + disablePluginInstanceActionOperationSettings = + settings.disablePluginInstanceActionOperationSettings.toBuilder(); + updatePluginInstanceSettings = settings.updatePluginInstanceSettings.toBuilder(); + deletePluginInstanceSettings = settings.deletePluginInstanceSettings.toBuilder(); + deletePluginInstanceOperationSettings = + settings.deletePluginInstanceOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -378,6 +811,17 @@ protected Builder(ApiHubPluginStubSettings settings) { getPluginSettings, enablePluginSettings, disablePluginSettings, + createPluginSettings, + listPluginsSettings, + deletePluginSettings, + createPluginInstanceSettings, + executePluginInstanceActionSettings, + getPluginInstanceSettings, + listPluginInstancesSettings, + enablePluginInstanceActionSettings, + disablePluginInstanceActionSettings, + updatePluginInstanceSettings, + deletePluginInstanceSettings, listLocationsSettings, getLocationSettings); } @@ -410,6 +854,61 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .createPluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listPluginsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deletePluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createPluginInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .executePluginInstanceActionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getPluginInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listPluginInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .enablePluginInstanceActionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .disablePluginInstanceActionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updatePluginInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deletePluginInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -420,6 +919,156 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .deletePluginOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createPluginInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PluginInstance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .executePluginInstanceActionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExecutePluginInstanceActionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .enablePluginInstanceActionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + EnablePluginInstanceActionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .disablePluginInstanceActionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + DisablePluginInstanceActionResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePluginInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -453,6 +1102,120 @@ public UnaryCallSettings.Builder disablePluginSett return disablePluginSettings; } + /** Returns the builder for the settings used for calls to createPlugin. */ + public UnaryCallSettings.Builder createPluginSettings() { + return createPluginSettings; + } + + /** Returns the builder for the settings used for calls to listPlugins. */ + public PagedCallSettings.Builder< + ListPluginsRequest, ListPluginsResponse, ListPluginsPagedResponse> + listPluginsSettings() { + return listPluginsSettings; + } + + /** Returns the builder for the settings used for calls to deletePlugin. */ + public UnaryCallSettings.Builder deletePluginSettings() { + return deletePluginSettings; + } + + /** Returns the builder for the settings used for calls to deletePlugin. */ + public OperationCallSettings.Builder + deletePluginOperationSettings() { + return deletePluginOperationSettings; + } + + /** Returns the builder for the settings used for calls to createPluginInstance. */ + public UnaryCallSettings.Builder + createPluginInstanceSettings() { + return createPluginInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createPluginInstance. */ + public OperationCallSettings.Builder< + CreatePluginInstanceRequest, PluginInstance, OperationMetadata> + createPluginInstanceOperationSettings() { + return createPluginInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to executePluginInstanceAction. */ + public UnaryCallSettings.Builder + executePluginInstanceActionSettings() { + return executePluginInstanceActionSettings; + } + + /** Returns the builder for the settings used for calls to executePluginInstanceAction. */ + public OperationCallSettings.Builder< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationSettings() { + return executePluginInstanceActionOperationSettings; + } + + /** Returns the builder for the settings used for calls to getPluginInstance. */ + public UnaryCallSettings.Builder + getPluginInstanceSettings() { + return getPluginInstanceSettings; + } + + /** Returns the builder for the settings used for calls to listPluginInstances. */ + public PagedCallSettings.Builder< + ListPluginInstancesRequest, + ListPluginInstancesResponse, + ListPluginInstancesPagedResponse> + listPluginInstancesSettings() { + return listPluginInstancesSettings; + } + + /** Returns the builder for the settings used for calls to enablePluginInstanceAction. */ + public UnaryCallSettings.Builder + enablePluginInstanceActionSettings() { + return enablePluginInstanceActionSettings; + } + + /** Returns the builder for the settings used for calls to enablePluginInstanceAction. */ + public OperationCallSettings.Builder< + EnablePluginInstanceActionRequest, + EnablePluginInstanceActionResponse, + OperationMetadata> + enablePluginInstanceActionOperationSettings() { + return enablePluginInstanceActionOperationSettings; + } + + /** Returns the builder for the settings used for calls to disablePluginInstanceAction. */ + public UnaryCallSettings.Builder + disablePluginInstanceActionSettings() { + return disablePluginInstanceActionSettings; + } + + /** Returns the builder for the settings used for calls to disablePluginInstanceAction. */ + public OperationCallSettings.Builder< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationSettings() { + return disablePluginInstanceActionOperationSettings; + } + + /** Returns the builder for the settings used for calls to updatePluginInstance. */ + public UnaryCallSettings.Builder + updatePluginInstanceSettings() { + return updatePluginInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deletePluginInstance. */ + public UnaryCallSettings.Builder + deletePluginInstanceSettings() { + return deletePluginInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deletePluginInstance. */ + public OperationCallSettings.Builder + deletePluginInstanceOperationSettings() { + return deletePluginInstanceOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStub.java index 46961f52b4f3..002455c791f8 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStub.java @@ -31,6 +31,7 @@ import com.google.cloud.apihub.v1.Api; import com.google.cloud.apihub.v1.ApiOperation; import com.google.cloud.apihub.v1.Attribute; +import com.google.cloud.apihub.v1.CreateApiOperationRequest; import com.google.cloud.apihub.v1.CreateApiRequest; import com.google.cloud.apihub.v1.CreateAttributeRequest; import com.google.cloud.apihub.v1.CreateDeploymentRequest; @@ -38,6 +39,7 @@ import com.google.cloud.apihub.v1.CreateSpecRequest; import com.google.cloud.apihub.v1.CreateVersionRequest; import com.google.cloud.apihub.v1.Definition; +import com.google.cloud.apihub.v1.DeleteApiOperationRequest; import com.google.cloud.apihub.v1.DeleteApiRequest; import com.google.cloud.apihub.v1.DeleteAttributeRequest; import com.google.cloud.apihub.v1.DeleteDeploymentRequest; @@ -73,6 +75,7 @@ import com.google.cloud.apihub.v1.SearchResourcesResponse; import com.google.cloud.apihub.v1.Spec; import com.google.cloud.apihub.v1.SpecContents; +import com.google.cloud.apihub.v1.UpdateApiOperationRequest; import com.google.cloud.apihub.v1.UpdateApiRequest; import com.google.cloud.apihub.v1.UpdateAttributeRequest; import com.google.cloud.apihub.v1.UpdateDeploymentRequest; @@ -172,6 +175,10 @@ public UnaryCallable deleteSpecCallable() { throw new UnsupportedOperationException("Not implemented: deleteSpecCallable()"); } + public UnaryCallable createApiOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createApiOperationCallable()"); + } + public UnaryCallable getApiOperationCallable() { throw new UnsupportedOperationException("Not implemented: getApiOperationCallable()"); } @@ -186,6 +193,14 @@ public UnaryCallable getApiOperationCallab throw new UnsupportedOperationException("Not implemented: listApiOperationsCallable()"); } + public UnaryCallable updateApiOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateApiOperationCallable()"); + } + + public UnaryCallable deleteApiOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiOperationCallable()"); + } + public UnaryCallable getDefinitionCallable() { throw new UnsupportedOperationException("Not implemented: getDefinitionCallable()"); } diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStubSettings.java index 2eca7f304709..59598f936e2d 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStubSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ApiHubStubSettings.java @@ -51,6 +51,7 @@ import com.google.cloud.apihub.v1.Api; import com.google.cloud.apihub.v1.ApiOperation; import com.google.cloud.apihub.v1.Attribute; +import com.google.cloud.apihub.v1.CreateApiOperationRequest; import com.google.cloud.apihub.v1.CreateApiRequest; import com.google.cloud.apihub.v1.CreateAttributeRequest; import com.google.cloud.apihub.v1.CreateDeploymentRequest; @@ -58,6 +59,7 @@ import com.google.cloud.apihub.v1.CreateSpecRequest; import com.google.cloud.apihub.v1.CreateVersionRequest; import com.google.cloud.apihub.v1.Definition; +import com.google.cloud.apihub.v1.DeleteApiOperationRequest; import com.google.cloud.apihub.v1.DeleteApiRequest; import com.google.cloud.apihub.v1.DeleteAttributeRequest; import com.google.cloud.apihub.v1.DeleteDeploymentRequest; @@ -94,6 +96,7 @@ import com.google.cloud.apihub.v1.SearchResult; import com.google.cloud.apihub.v1.Spec; import com.google.cloud.apihub.v1.SpecContents; +import com.google.cloud.apihub.v1.UpdateApiOperationRequest; import com.google.cloud.apihub.v1.UpdateApiRequest; import com.google.cloud.apihub.v1.UpdateAttributeRequest; import com.google.cloud.apihub.v1.UpdateDeploymentRequest; @@ -190,10 +193,15 @@ public class ApiHubStubSettings extends StubSettings { listSpecsSettings; private final UnaryCallSettings updateSpecSettings; private final UnaryCallSettings deleteSpecSettings; + private final UnaryCallSettings + createApiOperationSettings; private final UnaryCallSettings getApiOperationSettings; private final PagedCallSettings< ListApiOperationsRequest, ListApiOperationsResponse, ListApiOperationsPagedResponse> listApiOperationsSettings; + private final UnaryCallSettings + updateApiOperationSettings; + private final UnaryCallSettings deleteApiOperationSettings; private final UnaryCallSettings getDefinitionSettings; private final UnaryCallSettings createDeploymentSettings; private final UnaryCallSettings getDeploymentSettings; @@ -788,6 +796,11 @@ public UnaryCallSettings deleteSpecSettings() { return deleteSpecSettings; } + /** Returns the object with the settings used for calls to createApi. */ + public UnaryCallSettings createApiOperationSettings() { + return createApiOperationSettings; + } + /** Returns the object with the settings used for calls to getApi. */ public UnaryCallSettings getApiOperationSettings() { return getApiOperationSettings; @@ -800,6 +813,16 @@ public UnaryCallSettings getApiOperationSe return listApiOperationsSettings; } + /** Returns the object with the settings used for calls to updateApi. */ + public UnaryCallSettings updateApiOperationSettings() { + return updateApiOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteApi. */ + public UnaryCallSettings deleteApiOperationSettings() { + return deleteApiOperationSettings; + } + /** Returns the object with the settings used for calls to getDefinition. */ public UnaryCallSettings getDefinitionSettings() { return getDefinitionSettings; @@ -1001,8 +1024,11 @@ protected ApiHubStubSettings(Builder settingsBuilder) throws IOException { listSpecsSettings = settingsBuilder.listSpecsSettings().build(); updateSpecSettings = settingsBuilder.updateSpecSettings().build(); deleteSpecSettings = settingsBuilder.deleteSpecSettings().build(); + createApiOperationSettings = settingsBuilder.createApiOperationSettings().build(); getApiOperationSettings = settingsBuilder.getApiOperationSettings().build(); listApiOperationsSettings = settingsBuilder.listApiOperationsSettings().build(); + updateApiOperationSettings = settingsBuilder.updateApiOperationSettings().build(); + deleteApiOperationSettings = settingsBuilder.deleteApiOperationSettings().build(); getDefinitionSettings = settingsBuilder.getDefinitionSettings().build(); createDeploymentSettings = settingsBuilder.createDeploymentSettings().build(); getDeploymentSettings = settingsBuilder.getDeploymentSettings().build(); @@ -1050,11 +1076,17 @@ public static class Builder extends StubSettings.Builder updateSpecSettings; private final UnaryCallSettings.Builder deleteSpecSettings; + private final UnaryCallSettings.Builder + createApiOperationSettings; private final UnaryCallSettings.Builder getApiOperationSettings; private final PagedCallSettings.Builder< ListApiOperationsRequest, ListApiOperationsResponse, ListApiOperationsPagedResponse> listApiOperationsSettings; + private final UnaryCallSettings.Builder + updateApiOperationSettings; + private final UnaryCallSettings.Builder + deleteApiOperationSettings; private final UnaryCallSettings.Builder getDefinitionSettings; private final UnaryCallSettings.Builder createDeploymentSettings; @@ -1104,6 +1136,8 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -1132,6 +1166,14 @@ public static class Builder extends StubSettings.Builder deleteSpecSettings() return deleteSpecSettings; } + /** Returns the builder for the settings used for calls to createApi. */ + public UnaryCallSettings.Builder + createApiOperationSettings() { + return createApiOperationSettings; + } + /** Returns the builder for the settings used for calls to getApi. */ public UnaryCallSettings.Builder getApiOperationSettings() { @@ -1620,6 +1695,18 @@ public UnaryCallSettings.Builder deleteSpecSettings() return listApiOperationsSettings; } + /** Returns the builder for the settings used for calls to updateApi. */ + public UnaryCallSettings.Builder + updateApiOperationSettings() { + return updateApiOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteApi. */ + public UnaryCallSettings.Builder + deleteApiOperationSettings() { + return deleteApiOperationSettings; + } + /** Returns the builder for the settings used for calls to getDefinition. */ public UnaryCallSettings.Builder getDefinitionSettings() { return getDefinitionSettings; diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectCallableFactory.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectCallableFactory.java new file mode 100644 index 000000000000..31b24cf7a8fb --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +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 ApiHubCollect service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubCollectCallableFactory + 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); + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectStub.java new file mode 100644 index 000000000000..a2c64dae4448 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCollectStub.java @@ -0,0 +1,388 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +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.HttpJsonOperationSnapshot; +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.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CollectApiDataRequest; +import com.google.cloud.apihub.v1.CollectApiDataResponse; +import com.google.cloud.apihub.v1.OperationMetadata; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +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 ApiHubCollect service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubCollectStub extends ApiHubCollectStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(CollectApiDataResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + collectApiDataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCollect/CollectApiData") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{location=projects/*/locations/*}:collectApiData", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "location", request.getLocation()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearLocation().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CollectApiDataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable collectApiDataCallable; + private final OperationCallable + collectApiDataOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonApiHubCollectStub create(ApiHubCollectStubSettings settings) + throws IOException { + return new HttpJsonApiHubCollectStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonApiHubCollectStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonApiHubCollectStub( + ApiHubCollectStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonApiHubCollectStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonApiHubCollectStub( + ApiHubCollectStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonApiHubCollectStub, 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 HttpJsonApiHubCollectStub( + ApiHubCollectStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonApiHubCollectCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonApiHubCollectStub, 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 HttpJsonApiHubCollectStub( + ApiHubCollectStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings collectApiDataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(collectApiDataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("location", String.valueOf(request.getLocation())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.collectApiDataCallable = + callableFactory.createUnaryCallable( + collectApiDataTransportSettings, settings.collectApiDataSettings(), clientContext); + this.collectApiDataOperationCallable = + callableFactory.createOperationCallable( + collectApiDataTransportSettings, + settings.collectApiDataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(collectApiDataMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable collectApiDataCallable() { + return collectApiDataCallable; + } + + @Override + public OperationCallable + collectApiDataOperationCallable() { + return collectApiDataOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateCallableFactory.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateCallableFactory.java new file mode 100644 index 000000000000..c60338dc3cb6 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +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 ApiHubCurate service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubCurateCallableFactory + 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); + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateStub.java new file mode 100644 index 000000000000..2151f8e75754 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubCurateStub.java @@ -0,0 +1,576 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListCurationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListLocationsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CreateCurationRequest; +import com.google.cloud.apihub.v1.Curation; +import com.google.cloud.apihub.v1.DeleteCurationRequest; +import com.google.cloud.apihub.v1.GetCurationRequest; +import com.google.cloud.apihub.v1.ListCurationsRequest; +import com.google.cloud.apihub.v1.ListCurationsResponse; +import com.google.cloud.apihub.v1.UpdateCurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 ApiHubCurate service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubCurateStub extends ApiHubCurateStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createCurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCurate/CreateCuration") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/curations", + 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, "curationId", request.getCurationId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("curation", request.getCuration(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Curation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getCurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCurate/GetCuration") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/curations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Curation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCurationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCurate/ListCurations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/curations", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCurationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateCurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCurate/UpdateCuration") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{curation.name=projects/*/locations/*/curations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "curation.name", request.getCuration().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("curation", request.getCuration(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Curation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteCurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubCurate/DeleteCuration") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/curations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createCurationCallable; + private final UnaryCallable getCurationCallable; + private final UnaryCallable listCurationsCallable; + private final UnaryCallable + listCurationsPagedCallable; + private final UnaryCallable updateCurationCallable; + private final UnaryCallable deleteCurationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonApiHubCurateStub create(ApiHubCurateStubSettings settings) + throws IOException { + return new HttpJsonApiHubCurateStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonApiHubCurateStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonApiHubCurateStub( + ApiHubCurateStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonApiHubCurateStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonApiHubCurateStub( + ApiHubCurateStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonApiHubCurateStub, 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 HttpJsonApiHubCurateStub(ApiHubCurateStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonApiHubCurateCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonApiHubCurateStub, 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 HttpJsonApiHubCurateStub( + ApiHubCurateStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createCurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getCurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listCurationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCurationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateCurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("curation.name", String.valueOf(request.getCuration().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteCurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteCurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createCurationCallable = + callableFactory.createUnaryCallable( + createCurationTransportSettings, settings.createCurationSettings(), clientContext); + this.getCurationCallable = + callableFactory.createUnaryCallable( + getCurationTransportSettings, settings.getCurationSettings(), clientContext); + this.listCurationsCallable = + callableFactory.createUnaryCallable( + listCurationsTransportSettings, settings.listCurationsSettings(), clientContext); + this.listCurationsPagedCallable = + callableFactory.createPagedCallable( + listCurationsTransportSettings, settings.listCurationsSettings(), clientContext); + this.updateCurationCallable = + callableFactory.createUnaryCallable( + updateCurationTransportSettings, settings.updateCurationSettings(), clientContext); + this.deleteCurationCallable = + callableFactory.createUnaryCallable( + deleteCurationTransportSettings, settings.deleteCurationSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createCurationMethodDescriptor); + methodDescriptors.add(getCurationMethodDescriptor); + methodDescriptors.add(listCurationsMethodDescriptor); + methodDescriptors.add(updateCurationMethodDescriptor); + methodDescriptors.add(deleteCurationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createCurationCallable() { + return createCurationCallable; + } + + @Override + public UnaryCallable getCurationCallable() { + return getCurationCallable; + } + + @Override + public UnaryCallable listCurationsCallable() { + return listCurationsCallable; + } + + @Override + public UnaryCallable + listCurationsPagedCallable() { + return listCurationsPagedCallable; + } + + @Override + public UnaryCallable updateCurationCallable() { + return updateCurationCallable; + } + + @Override + public UnaryCallable deleteCurationCallable() { + return deleteCurationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryCallableFactory.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryCallableFactory.java new file mode 100644 index 000000000000..5d8e392d18b7 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +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 ApiHubDiscovery service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubDiscoveryCallableFactory + 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); + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryStub.java new file mode 100644 index 000000000000..ce436f6d30dd --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubDiscoveryStub.java @@ -0,0 +1,571 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1.stub; + +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListLocationsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.DiscoveredApiObservation; +import com.google.cloud.apihub.v1.DiscoveredApiOperation; +import com.google.cloud.apihub.v1.GetDiscoveredApiObservationRequest; +import com.google.cloud.apihub.v1.GetDiscoveredApiOperationRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiObservationsResponse; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsRequest; +import com.google.cloud.apihub.v1.ListDiscoveredApiOperationsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 ApiHubDiscovery service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonApiHubDiscoveryStub extends ApiHubDiscoveryStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse> + listDiscoveredApiObservationsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.apihub.v1.ApiHubDiscovery/ListDiscoveredApiObservations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/discoveredApiObservations", + 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()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ListDiscoveredApiObservationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + GetDiscoveredApiObservationRequest, DiscoveredApiObservation> + getDiscoveredApiObservationMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.apihub.v1.ApiHubDiscovery/GetDiscoveredApiObservation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/discoveredApiObservations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiscoveredApiObservation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsResponse> + listDiscoveredApiOperationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.apihub.v1.ApiHubDiscovery/ListDiscoveredApiOperations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/discoveredApiObservations/*}/discoveredApiOperations", + 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()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDiscoveredApiOperationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDiscoveredApiOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubDiscovery/GetDiscoveredApiOperation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/discoveredApiObservations/*/discoveredApiOperations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiscoveredApiOperation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse> + listDiscoveredApiObservationsCallable; + private final UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsPagedCallable; + private final UnaryCallable + getDiscoveredApiObservationCallable; + private final UnaryCallable< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsResponse> + listDiscoveredApiOperationsCallable; + private final UnaryCallable< + ListDiscoveredApiOperationsRequest, ListDiscoveredApiOperationsPagedResponse> + listDiscoveredApiOperationsPagedCallable; + private final UnaryCallable + getDiscoveredApiOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonApiHubDiscoveryStub create(ApiHubDiscoveryStubSettings settings) + throws IOException { + return new HttpJsonApiHubDiscoveryStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonApiHubDiscoveryStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonApiHubDiscoveryStub( + ApiHubDiscoveryStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonApiHubDiscoveryStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonApiHubDiscoveryStub( + ApiHubDiscoveryStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonApiHubDiscoveryStub, 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 HttpJsonApiHubDiscoveryStub( + ApiHubDiscoveryStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonApiHubDiscoveryCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonApiHubDiscoveryStub, 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 HttpJsonApiHubDiscoveryStub( + ApiHubDiscoveryStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsResponse> + listDiscoveredApiObservationsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listDiscoveredApiObservationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getDiscoveredApiObservationTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getDiscoveredApiObservationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDiscoveredApiOperationsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listDiscoveredApiOperationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getDiscoveredApiOperationTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getDiscoveredApiOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listDiscoveredApiObservationsCallable = + callableFactory.createUnaryCallable( + listDiscoveredApiObservationsTransportSettings, + settings.listDiscoveredApiObservationsSettings(), + clientContext); + this.listDiscoveredApiObservationsPagedCallable = + callableFactory.createPagedCallable( + listDiscoveredApiObservationsTransportSettings, + settings.listDiscoveredApiObservationsSettings(), + clientContext); + this.getDiscoveredApiObservationCallable = + callableFactory.createUnaryCallable( + getDiscoveredApiObservationTransportSettings, + settings.getDiscoveredApiObservationSettings(), + clientContext); + this.listDiscoveredApiOperationsCallable = + callableFactory.createUnaryCallable( + listDiscoveredApiOperationsTransportSettings, + settings.listDiscoveredApiOperationsSettings(), + clientContext); + this.listDiscoveredApiOperationsPagedCallable = + callableFactory.createPagedCallable( + listDiscoveredApiOperationsTransportSettings, + settings.listDiscoveredApiOperationsSettings(), + clientContext); + this.getDiscoveredApiOperationCallable = + callableFactory.createUnaryCallable( + getDiscoveredApiOperationTransportSettings, + settings.getDiscoveredApiOperationSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listDiscoveredApiObservationsMethodDescriptor); + methodDescriptors.add(getDiscoveredApiObservationMethodDescriptor); + methodDescriptors.add(listDiscoveredApiOperationsMethodDescriptor); + methodDescriptors.add(getDiscoveredApiOperationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + listDiscoveredApiObservationsCallable() { + return listDiscoveredApiObservationsCallable; + } + + @Override + public UnaryCallable< + ListDiscoveredApiObservationsRequest, ListDiscoveredApiObservationsPagedResponse> + listDiscoveredApiObservationsPagedCallable() { + return listDiscoveredApiObservationsPagedCallable; + } + + @Override + public UnaryCallable + getDiscoveredApiObservationCallable() { + return getDiscoveredApiObservationCallable; + } + + @Override + public UnaryCallable + listDiscoveredApiOperationsCallable() { + return listDiscoveredApiOperationsCallable; + } + + @Override + public UnaryCallable + listDiscoveredApiOperationsPagedCallable() { + return listDiscoveredApiOperationsPagedCallable; + } + + @Override + public UnaryCallable + getDiscoveredApiOperationCallable() { + return getDiscoveredApiOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubPluginStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubPluginStub.java index e31bd48a599d..00e5738ffb64 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubPluginStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubPluginStub.java @@ -17,27 +17,54 @@ package com.google.cloud.apihub.v1.stub; import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListLocationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginInstancesPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginsPagedResponse; +import com.google.api.HttpRule; 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.HttpJsonOperationSnapshot; 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.httpjson.longrunning.stub.HttpJsonOperationsStub; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.apihub.v1.CreatePluginInstanceRequest; +import com.google.cloud.apihub.v1.CreatePluginRequest; +import com.google.cloud.apihub.v1.DeletePluginInstanceRequest; +import com.google.cloud.apihub.v1.DeletePluginRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.DisablePluginRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.EnablePluginInstanceActionResponse; import com.google.cloud.apihub.v1.EnablePluginRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionRequest; +import com.google.cloud.apihub.v1.ExecutePluginInstanceActionResponse; +import com.google.cloud.apihub.v1.GetPluginInstanceRequest; import com.google.cloud.apihub.v1.GetPluginRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesRequest; +import com.google.cloud.apihub.v1.ListPluginInstancesResponse; +import com.google.cloud.apihub.v1.ListPluginsRequest; +import com.google.cloud.apihub.v1.ListPluginsResponse; +import com.google.cloud.apihub.v1.OperationMetadata; import com.google.cloud.apihub.v1.Plugin; +import com.google.cloud.apihub.v1.PluginInstance; +import com.google.cloud.apihub.v1.UpdatePluginInstanceRequest; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; import java.util.ArrayList; @@ -55,7 +82,15 @@ */ @Generated("by gapic-generator-java") public class HttpJsonApiHubPluginStub extends ApiHubPluginStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(ExecutePluginInstanceActionResponse.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(DisablePluginInstanceActionResponse.getDescriptor()) + .add(PluginInstance.getDescriptor()) + .add(EnablePluginInstanceActionResponse.getDescriptor()) + .build(); private static final ApiMethodDescriptor getPluginMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -164,6 +199,429 @@ public class HttpJsonApiHubPluginStub extends ApiHubPluginStub { .build()) .build(); + private static final ApiMethodDescriptor + createPluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/CreatePlugin") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/plugins", + 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, "pluginId", request.getPluginId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("plugin", request.getPlugin(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Plugin.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPluginsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/ListPlugins") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/plugins", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPluginsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/DeletePlugin") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePluginRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createPluginInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/CreatePluginInstance") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/plugins/*}/instances", + 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, "pluginInstanceId", request.getPluginInstanceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("pluginInstance", request.getPluginInstance(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreatePluginInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + executePluginInstanceActionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/ExecutePluginInstanceAction") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*/instances/*}:executeAction", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExecutePluginInstanceActionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getPluginInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/GetPluginInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*/instances/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PluginInstance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPluginInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/ListPluginInstances") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/plugins/*}/instances", + 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, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPluginInstancesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + enablePluginInstanceActionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/EnablePluginInstanceAction") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*/instances/*}:enableAction", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (EnablePluginInstanceActionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + disablePluginInstanceActionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/DisablePluginInstanceAction") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*/instances/*}:disableAction", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DisablePluginInstanceActionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updatePluginInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/UpdatePluginInstance") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{pluginInstance.name=projects/*/locations/*/plugins/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "pluginInstance.name", + request.getPluginInstance().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("pluginInstance", request.getPluginInstance(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PluginInstance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePluginInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHubPlugin/DeletePluginInstance") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/plugins/*/instances/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeletePluginInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -235,12 +693,52 @@ public class HttpJsonApiHubPluginStub extends ApiHubPluginStub { private final UnaryCallable getPluginCallable; private final UnaryCallable enablePluginCallable; private final UnaryCallable disablePluginCallable; + private final UnaryCallable createPluginCallable; + private final UnaryCallable listPluginsCallable; + private final UnaryCallable + listPluginsPagedCallable; + private final UnaryCallable deletePluginCallable; + private final OperationCallable + deletePluginOperationCallable; + private final UnaryCallable createPluginInstanceCallable; + private final OperationCallable + createPluginInstanceOperationCallable; + private final UnaryCallable + executePluginInstanceActionCallable; + private final OperationCallable< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationCallable; + private final UnaryCallable getPluginInstanceCallable; + private final UnaryCallable + listPluginInstancesCallable; + private final UnaryCallable + listPluginInstancesPagedCallable; + private final UnaryCallable + enablePluginInstanceActionCallable; + private final OperationCallable< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationCallable; + private final UnaryCallable + disablePluginInstanceActionCallable; + private final OperationCallable< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationCallable; + private final UnaryCallable + updatePluginInstanceCallable; + private final UnaryCallable deletePluginInstanceCallable; + private final OperationCallable + deletePluginInstanceOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonApiHubPluginStub create(ApiHubPluginStubSettings settings) @@ -281,6 +779,33 @@ protected HttpJsonApiHubPluginStub( HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); HttpJsonCallSettings getPluginTransportSettings = HttpJsonCallSettings.newBuilder() @@ -315,6 +840,138 @@ protected HttpJsonApiHubPluginStub( return builder.build(); }) .build(); + HttpJsonCallSettings createPluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listPluginsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPluginsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deletePluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createPluginInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPluginInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + executePluginInstanceActionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(executePluginInstanceActionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getPluginInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPluginInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPluginInstancesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listPluginInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + enablePluginInstanceActionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(enablePluginInstanceActionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + disablePluginInstanceActionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(disablePluginInstanceActionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updatePluginInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePluginInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "plugin_instance.name", + String.valueOf(request.getPluginInstance().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePluginInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePluginInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -348,6 +1005,99 @@ protected HttpJsonApiHubPluginStub( this.disablePluginCallable = callableFactory.createUnaryCallable( disablePluginTransportSettings, settings.disablePluginSettings(), clientContext); + this.createPluginCallable = + callableFactory.createUnaryCallable( + createPluginTransportSettings, settings.createPluginSettings(), clientContext); + this.listPluginsCallable = + callableFactory.createUnaryCallable( + listPluginsTransportSettings, settings.listPluginsSettings(), clientContext); + this.listPluginsPagedCallable = + callableFactory.createPagedCallable( + listPluginsTransportSettings, settings.listPluginsSettings(), clientContext); + this.deletePluginCallable = + callableFactory.createUnaryCallable( + deletePluginTransportSettings, settings.deletePluginSettings(), clientContext); + this.deletePluginOperationCallable = + callableFactory.createOperationCallable( + deletePluginTransportSettings, + settings.deletePluginOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createPluginInstanceCallable = + callableFactory.createUnaryCallable( + createPluginInstanceTransportSettings, + settings.createPluginInstanceSettings(), + clientContext); + this.createPluginInstanceOperationCallable = + callableFactory.createOperationCallable( + createPluginInstanceTransportSettings, + settings.createPluginInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.executePluginInstanceActionCallable = + callableFactory.createUnaryCallable( + executePluginInstanceActionTransportSettings, + settings.executePluginInstanceActionSettings(), + clientContext); + this.executePluginInstanceActionOperationCallable = + callableFactory.createOperationCallable( + executePluginInstanceActionTransportSettings, + settings.executePluginInstanceActionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getPluginInstanceCallable = + callableFactory.createUnaryCallable( + getPluginInstanceTransportSettings, + settings.getPluginInstanceSettings(), + clientContext); + this.listPluginInstancesCallable = + callableFactory.createUnaryCallable( + listPluginInstancesTransportSettings, + settings.listPluginInstancesSettings(), + clientContext); + this.listPluginInstancesPagedCallable = + callableFactory.createPagedCallable( + listPluginInstancesTransportSettings, + settings.listPluginInstancesSettings(), + clientContext); + this.enablePluginInstanceActionCallable = + callableFactory.createUnaryCallable( + enablePluginInstanceActionTransportSettings, + settings.enablePluginInstanceActionSettings(), + clientContext); + this.enablePluginInstanceActionOperationCallable = + callableFactory.createOperationCallable( + enablePluginInstanceActionTransportSettings, + settings.enablePluginInstanceActionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.disablePluginInstanceActionCallable = + callableFactory.createUnaryCallable( + disablePluginInstanceActionTransportSettings, + settings.disablePluginInstanceActionSettings(), + clientContext); + this.disablePluginInstanceActionOperationCallable = + callableFactory.createOperationCallable( + disablePluginInstanceActionTransportSettings, + settings.disablePluginInstanceActionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updatePluginInstanceCallable = + callableFactory.createUnaryCallable( + updatePluginInstanceTransportSettings, + settings.updatePluginInstanceSettings(), + clientContext); + this.deletePluginInstanceCallable = + callableFactory.createUnaryCallable( + deletePluginInstanceTransportSettings, + settings.deletePluginInstanceSettings(), + clientContext); + this.deletePluginInstanceOperationCallable = + callableFactory.createOperationCallable( + deletePluginInstanceTransportSettings, + settings.deletePluginInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -368,11 +1118,26 @@ public static List getMethodDescriptors() { methodDescriptors.add(getPluginMethodDescriptor); methodDescriptors.add(enablePluginMethodDescriptor); methodDescriptors.add(disablePluginMethodDescriptor); + methodDescriptors.add(createPluginMethodDescriptor); + methodDescriptors.add(listPluginsMethodDescriptor); + methodDescriptors.add(deletePluginMethodDescriptor); + methodDescriptors.add(createPluginInstanceMethodDescriptor); + methodDescriptors.add(executePluginInstanceActionMethodDescriptor); + methodDescriptors.add(getPluginInstanceMethodDescriptor); + methodDescriptors.add(listPluginInstancesMethodDescriptor); + methodDescriptors.add(enablePluginInstanceActionMethodDescriptor); + methodDescriptors.add(disablePluginInstanceActionMethodDescriptor); + methodDescriptors.add(updatePluginInstanceMethodDescriptor); + methodDescriptors.add(deletePluginInstanceMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + @Override public UnaryCallable getPluginCallable() { return getPluginCallable; @@ -388,6 +1153,119 @@ public UnaryCallable disablePluginCallable() { return disablePluginCallable; } + @Override + public UnaryCallable createPluginCallable() { + return createPluginCallable; + } + + @Override + public UnaryCallable listPluginsCallable() { + return listPluginsCallable; + } + + @Override + public UnaryCallable listPluginsPagedCallable() { + return listPluginsPagedCallable; + } + + @Override + public UnaryCallable deletePluginCallable() { + return deletePluginCallable; + } + + @Override + public OperationCallable + deletePluginOperationCallable() { + return deletePluginOperationCallable; + } + + @Override + public UnaryCallable createPluginInstanceCallable() { + return createPluginInstanceCallable; + } + + @Override + public OperationCallable + createPluginInstanceOperationCallable() { + return createPluginInstanceOperationCallable; + } + + @Override + public UnaryCallable + executePluginInstanceActionCallable() { + return executePluginInstanceActionCallable; + } + + @Override + public OperationCallable< + ExecutePluginInstanceActionRequest, + ExecutePluginInstanceActionResponse, + OperationMetadata> + executePluginInstanceActionOperationCallable() { + return executePluginInstanceActionOperationCallable; + } + + @Override + public UnaryCallable getPluginInstanceCallable() { + return getPluginInstanceCallable; + } + + @Override + public UnaryCallable + listPluginInstancesCallable() { + return listPluginInstancesCallable; + } + + @Override + public UnaryCallable + listPluginInstancesPagedCallable() { + return listPluginInstancesPagedCallable; + } + + @Override + public UnaryCallable + enablePluginInstanceActionCallable() { + return enablePluginInstanceActionCallable; + } + + @Override + public OperationCallable< + EnablePluginInstanceActionRequest, EnablePluginInstanceActionResponse, OperationMetadata> + enablePluginInstanceActionOperationCallable() { + return enablePluginInstanceActionOperationCallable; + } + + @Override + public UnaryCallable + disablePluginInstanceActionCallable() { + return disablePluginInstanceActionCallable; + } + + @Override + public OperationCallable< + DisablePluginInstanceActionRequest, + DisablePluginInstanceActionResponse, + OperationMetadata> + disablePluginInstanceActionOperationCallable() { + return disablePluginInstanceActionOperationCallable; + } + + @Override + public UnaryCallable updatePluginInstanceCallable() { + return updatePluginInstanceCallable; + } + + @Override + public UnaryCallable deletePluginInstanceCallable() { + return deletePluginInstanceCallable; + } + + @Override + public OperationCallable + deletePluginInstanceOperationCallable() { + return deletePluginInstanceOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubStub.java index f7ed5a85dd5f..e68561b41274 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonApiHubStub.java @@ -41,6 +41,7 @@ import com.google.cloud.apihub.v1.Api; import com.google.cloud.apihub.v1.ApiOperation; import com.google.cloud.apihub.v1.Attribute; +import com.google.cloud.apihub.v1.CreateApiOperationRequest; import com.google.cloud.apihub.v1.CreateApiRequest; import com.google.cloud.apihub.v1.CreateAttributeRequest; import com.google.cloud.apihub.v1.CreateDeploymentRequest; @@ -48,6 +49,7 @@ import com.google.cloud.apihub.v1.CreateSpecRequest; import com.google.cloud.apihub.v1.CreateVersionRequest; import com.google.cloud.apihub.v1.Definition; +import com.google.cloud.apihub.v1.DeleteApiOperationRequest; import com.google.cloud.apihub.v1.DeleteApiRequest; import com.google.cloud.apihub.v1.DeleteAttributeRequest; import com.google.cloud.apihub.v1.DeleteDeploymentRequest; @@ -83,6 +85,7 @@ import com.google.cloud.apihub.v1.SearchResourcesResponse; import com.google.cloud.apihub.v1.Spec; import com.google.cloud.apihub.v1.SpecContents; +import com.google.cloud.apihub.v1.UpdateApiOperationRequest; import com.google.cloud.apihub.v1.UpdateApiRequest; import com.google.cloud.apihub.v1.UpdateAttributeRequest; import com.google.cloud.apihub.v1.UpdateDeploymentRequest; @@ -679,6 +682,45 @@ public class HttpJsonApiHubStub extends ApiHubStub { .build()) .build(); + private static final ApiMethodDescriptor + createApiOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHub/CreateApiOperation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/operations", + 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, "apiOperationId", request.getApiOperationId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiOperation", request.getApiOperation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiOperation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getApiOperationMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -750,6 +792,79 @@ public class HttpJsonApiHubStub extends ApiHubStub { .build()) .build(); + private static final ApiMethodDescriptor + updateApiOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHub/UpdateApiOperation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{apiOperation.name=projects/*/locations/*/apis/*/versions/*/operations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "apiOperation.name", request.getApiOperation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("apiOperation", request.getApiOperation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ApiOperation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteApiOperationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.ApiHub/DeleteApiOperation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apis/*/versions/*/operations/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getDefinitionMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1457,11 +1572,14 @@ public class HttpJsonApiHubStub extends ApiHubStub { private final UnaryCallable listSpecsPagedCallable; private final UnaryCallable updateSpecCallable; private final UnaryCallable deleteSpecCallable; + private final UnaryCallable createApiOperationCallable; private final UnaryCallable getApiOperationCallable; private final UnaryCallable listApiOperationsCallable; private final UnaryCallable listApiOperationsPagedCallable; + private final UnaryCallable updateApiOperationCallable; + private final UnaryCallable deleteApiOperationCallable; private final UnaryCallable getDefinitionCallable; private final UnaryCallable createDeploymentCallable; private final UnaryCallable getDeploymentCallable; @@ -1710,6 +1828,18 @@ protected HttpJsonApiHubStub( return builder.build(); }) .build(); + HttpJsonCallSettings + createApiOperationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApiOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getApiOperationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getApiOperationMethodDescriptor) @@ -1733,6 +1863,31 @@ protected HttpJsonApiHubStub( return builder.build(); }) .build(); + HttpJsonCallSettings + updateApiOperationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApiOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "api_operation.name", + String.valueOf(request.getApiOperation().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteApiOperationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiOperationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getDefinitionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getDefinitionMethodDescriptor) @@ -2006,6 +2161,11 @@ protected HttpJsonApiHubStub( this.deleteSpecCallable = callableFactory.createUnaryCallable( deleteSpecTransportSettings, settings.deleteSpecSettings(), clientContext); + this.createApiOperationCallable = + callableFactory.createUnaryCallable( + createApiOperationTransportSettings, + settings.createApiOperationSettings(), + clientContext); this.getApiOperationCallable = callableFactory.createUnaryCallable( getApiOperationTransportSettings, settings.getApiOperationSettings(), clientContext); @@ -2019,6 +2179,16 @@ protected HttpJsonApiHubStub( listApiOperationsTransportSettings, settings.listApiOperationsSettings(), clientContext); + this.updateApiOperationCallable = + callableFactory.createUnaryCallable( + updateApiOperationTransportSettings, + settings.updateApiOperationSettings(), + clientContext); + this.deleteApiOperationCallable = + callableFactory.createUnaryCallable( + deleteApiOperationTransportSettings, + settings.deleteApiOperationSettings(), + clientContext); this.getDefinitionCallable = callableFactory.createUnaryCallable( getDefinitionTransportSettings, settings.getDefinitionSettings(), clientContext); @@ -2121,8 +2291,11 @@ public static List getMethodDescriptors() { methodDescriptors.add(listSpecsMethodDescriptor); methodDescriptors.add(updateSpecMethodDescriptor); methodDescriptors.add(deleteSpecMethodDescriptor); + methodDescriptors.add(createApiOperationMethodDescriptor); methodDescriptors.add(getApiOperationMethodDescriptor); methodDescriptors.add(listApiOperationsMethodDescriptor); + methodDescriptors.add(updateApiOperationMethodDescriptor); + methodDescriptors.add(deleteApiOperationMethodDescriptor); methodDescriptors.add(getDefinitionMethodDescriptor); methodDescriptors.add(createDeploymentMethodDescriptor); methodDescriptors.add(getDeploymentMethodDescriptor); @@ -2240,6 +2413,11 @@ public UnaryCallable deleteSpecCallable() { return deleteSpecCallable; } + @Override + public UnaryCallable createApiOperationCallable() { + return createApiOperationCallable; + } + @Override public UnaryCallable getApiOperationCallable() { return getApiOperationCallable; @@ -2257,6 +2435,16 @@ public UnaryCallable getApiOperationCallab return listApiOperationsPagedCallable; } + @Override + public UnaryCallable updateApiOperationCallable() { + return updateApiOperationCallable; + } + + @Override + public UnaryCallable deleteApiOperationCallable() { + return deleteApiOperationCallable; + } + @Override public UnaryCallable getDefinitionCallable() { return getDefinitionCallable; diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonProvisioningStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonProvisioningStub.java index 60658875d75a..b22f6b92219a 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonProvisioningStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/HttpJsonProvisioningStub.java @@ -36,6 +36,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.apihub.v1.ApiHubInstance; import com.google.cloud.apihub.v1.CreateApiHubInstanceRequest; +import com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest; import com.google.cloud.apihub.v1.GetApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceResponse; @@ -46,6 +47,7 @@ import com.google.cloud.location.Location; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; import java.util.ArrayList; @@ -65,6 +67,7 @@ public class HttpJsonProvisioningStub extends ProvisioningStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) .add(ApiHubInstance.getDescriptor()) .add(OperationMetadata.getDescriptor()) .build(); @@ -111,6 +114,43 @@ public class HttpJsonProvisioningStub extends ProvisioningStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + deleteApiHubInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.apihub.v1.Provisioning/DeleteApiHubInstance") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/apiHubInstances/*}", + 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(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteApiHubInstanceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor getApiHubInstanceMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -252,6 +292,9 @@ public class HttpJsonProvisioningStub extends ProvisioningStub { private final UnaryCallable createApiHubInstanceCallable; private final OperationCallable createApiHubInstanceOperationCallable; + private final UnaryCallable deleteApiHubInstanceCallable; + private final OperationCallable + deleteApiHubInstanceOperationCallable; private final UnaryCallable getApiHubInstanceCallable; private final UnaryCallable lookupApiHubInstanceCallable; @@ -342,6 +385,18 @@ protected HttpJsonProvisioningStub( return builder.build(); }) .build(); + HttpJsonCallSettings + deleteApiHubInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApiHubInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getApiHubInstanceTransportSettings = HttpJsonCallSettings.newBuilder() @@ -402,6 +457,17 @@ protected HttpJsonProvisioningStub( settings.createApiHubInstanceOperationSettings(), clientContext, httpJsonOperationsStub); + this.deleteApiHubInstanceCallable = + callableFactory.createUnaryCallable( + deleteApiHubInstanceTransportSettings, + settings.deleteApiHubInstanceSettings(), + clientContext); + this.deleteApiHubInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteApiHubInstanceTransportSettings, + settings.deleteApiHubInstanceOperationSettings(), + clientContext, + httpJsonOperationsStub); this.getApiHubInstanceCallable = callableFactory.createUnaryCallable( getApiHubInstanceTransportSettings, @@ -430,6 +496,7 @@ protected HttpJsonProvisioningStub( public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(createApiHubInstanceMethodDescriptor); + methodDescriptors.add(deleteApiHubInstanceMethodDescriptor); methodDescriptors.add(getApiHubInstanceMethodDescriptor); methodDescriptors.add(lookupApiHubInstanceMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); @@ -452,6 +519,17 @@ public UnaryCallable createApiHubInstanc return createApiHubInstanceOperationCallable; } + @Override + public UnaryCallable deleteApiHubInstanceCallable() { + return deleteApiHubInstanceCallable; + } + + @Override + public OperationCallable + deleteApiHubInstanceOperationCallable() { + return deleteApiHubInstanceOperationCallable; + } + @Override public UnaryCallable getApiHubInstanceCallable() { return getApiHubInstanceCallable; diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStub.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStub.java index c1c4ebec31cf..76dd732e5166 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStub.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStub.java @@ -24,6 +24,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.apihub.v1.ApiHubInstance; import com.google.cloud.apihub.v1.CreateApiHubInstanceRequest; +import com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest; import com.google.cloud.apihub.v1.GetApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceResponse; @@ -33,6 +34,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -58,6 +60,16 @@ public UnaryCallable createApiHubInstanc throw new UnsupportedOperationException("Not implemented: createApiHubInstanceCallable()"); } + public OperationCallable + deleteApiHubInstanceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteApiHubInstanceOperationCallable()"); + } + + public UnaryCallable deleteApiHubInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApiHubInstanceCallable()"); + } + public UnaryCallable getApiHubInstanceCallable() { throw new UnsupportedOperationException("Not implemented: getApiHubInstanceCallable()"); } diff --git a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStubSettings.java b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStubSettings.java index c372e5da2652..2d5cf8edad1d 100644 --- a/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStubSettings.java +++ b/java-apihub/google-cloud-apihub/src/main/java/com/google/cloud/apihub/v1/stub/ProvisioningStubSettings.java @@ -46,6 +46,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.apihub.v1.ApiHubInstance; import com.google.cloud.apihub.v1.CreateApiHubInstanceRequest; +import com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest; import com.google.cloud.apihub.v1.GetApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceRequest; import com.google.cloud.apihub.v1.LookupApiHubInstanceResponse; @@ -59,6 +60,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.longrunning.Operation; +import com.google.protobuf.Empty; import java.io.IOException; import java.time.Duration; import java.util.List; @@ -151,6 +153,10 @@ public class ProvisioningStubSettings extends StubSettings createApiHubInstanceOperationSettings; + private final UnaryCallSettings + deleteApiHubInstanceSettings; + private final OperationCallSettings + deleteApiHubInstanceOperationSettings; private final UnaryCallSettings getApiHubInstanceSettings; private final UnaryCallSettings @@ -222,6 +228,17 @@ public UnaryCallSettings createApiHubIns return createApiHubInstanceOperationSettings; } + /** Returns the object with the settings used for calls to deleteApiHubInstance. */ + public UnaryCallSettings deleteApiHubInstanceSettings() { + return deleteApiHubInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteApiHubInstance. */ + public OperationCallSettings + deleteApiHubInstanceOperationSettings() { + return deleteApiHubInstanceOperationSettings; + } + /** Returns the object with the settings used for calls to getApiHubInstance. */ public UnaryCallSettings getApiHubInstanceSettings() { return getApiHubInstanceSettings; @@ -329,6 +346,9 @@ protected ProvisioningStubSettings(Builder settingsBuilder) throws IOException { createApiHubInstanceSettings = settingsBuilder.createApiHubInstanceSettings().build(); createApiHubInstanceOperationSettings = settingsBuilder.createApiHubInstanceOperationSettings().build(); + deleteApiHubInstanceSettings = settingsBuilder.deleteApiHubInstanceSettings().build(); + deleteApiHubInstanceOperationSettings = + settingsBuilder.deleteApiHubInstanceOperationSettings().build(); getApiHubInstanceSettings = settingsBuilder.getApiHubInstanceSettings().build(); lookupApiHubInstanceSettings = settingsBuilder.lookupApiHubInstanceSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); @@ -343,6 +363,11 @@ public static class Builder extends StubSettings.Builder createApiHubInstanceOperationSettings; + private final UnaryCallSettings.Builder + deleteApiHubInstanceSettings; + private final OperationCallSettings.Builder< + DeleteApiHubInstanceRequest, Empty, OperationMetadata> + deleteApiHubInstanceOperationSettings; private final UnaryCallSettings.Builder getApiHubInstanceSettings; private final UnaryCallSettings.Builder< @@ -360,10 +385,10 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -380,6 +405,8 @@ public static class Builder extends StubSettings.Builder>of( createApiHubInstanceSettings, + deleteApiHubInstanceSettings, getApiHubInstanceSettings, lookupApiHubInstanceSettings, listLocationsSettings, @@ -426,6 +454,9 @@ protected Builder(ProvisioningStubSettings settings) { createApiHubInstanceSettings = settings.createApiHubInstanceSettings.toBuilder(); createApiHubInstanceOperationSettings = settings.createApiHubInstanceOperationSettings.toBuilder(); + deleteApiHubInstanceSettings = settings.deleteApiHubInstanceSettings.toBuilder(); + deleteApiHubInstanceOperationSettings = + settings.deleteApiHubInstanceOperationSettings.toBuilder(); getApiHubInstanceSettings = settings.getApiHubInstanceSettings.toBuilder(); lookupApiHubInstanceSettings = settings.lookupApiHubInstanceSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); @@ -434,6 +465,7 @@ protected Builder(ProvisioningStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( createApiHubInstanceSettings, + deleteApiHubInstanceSettings, getApiHubInstanceSettings, lookupApiHubInstanceSettings, listLocationsSettings, @@ -458,6 +490,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .deleteApiHubInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getApiHubInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -502,6 +539,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .deleteApiHubInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -533,6 +594,18 @@ public Builder applyToAllUnaryMethods( return createApiHubInstanceOperationSettings; } + /** Returns the builder for the settings used for calls to deleteApiHubInstance. */ + public UnaryCallSettings.Builder + deleteApiHubInstanceSettings() { + return deleteApiHubInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteApiHubInstance. */ + public OperationCallSettings.Builder + deleteApiHubInstanceOperationSettings() { + return deleteApiHubInstanceOperationSettings; + } + /** Returns the builder for the settings used for calls to getApiHubInstance. */ public UnaryCallSettings.Builder getApiHubInstanceSettings() { diff --git a/java-apihub/google-cloud-apihub/src/main/resources/META-INF/native-image/com.google.cloud.apihub.v1/reflect-config.json b/java-apihub/google-cloud-apihub/src/main/resources/META-INF/native-image/com.google.cloud.apihub.v1/reflect-config.json index 08949a8b0ed8..4dda06630610 100644 --- a/java-apihub/google-cloud-apihub/src/main/resources/META-INF/native-image/com.google.cloud.apihub.v1/reflect-config.json +++ b/java-apihub/google-cloud-apihub/src/main/resources/META-INF/native-image/com.google.cloud.apihub.v1/reflect-config.json @@ -414,7 +414,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Api", + "name": "com.google.cloud.apihub.v1.APIMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -423,7 +423,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Api$Builder", + "name": "com.google.cloud.apihub.v1.APIMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -432,7 +432,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubInstance", + "name": "com.google.cloud.apihub.v1.ActionExecutionDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -441,7 +441,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubInstance$Builder", + "name": "com.google.cloud.apihub.v1.ActionExecutionDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -450,7 +450,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubInstance$Config", + "name": "com.google.cloud.apihub.v1.ActionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -459,7 +459,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubInstance$Config$Builder", + "name": "com.google.cloud.apihub.v1.Api", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -468,7 +468,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubInstance$State", + "name": "com.google.cloud.apihub.v1.Api$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -477,7 +477,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubResource", + "name": "com.google.cloud.apihub.v1.ApiData", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -486,7 +486,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiHubResource$Builder", + "name": "com.google.cloud.apihub.v1.ApiData$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -495,7 +495,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiOperation", + "name": "com.google.cloud.apihub.v1.ApiHubInstance", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -504,7 +504,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ApiOperation$Builder", + "name": "com.google.cloud.apihub.v1.ApiHubInstance$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -513,7 +513,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute", + "name": "com.google.cloud.apihub.v1.ApiHubInstance$Config", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -522,7 +522,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$AllowedValue", + "name": "com.google.cloud.apihub.v1.ApiHubInstance$Config$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -531,7 +531,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$AllowedValue$Builder", + "name": "com.google.cloud.apihub.v1.ApiHubInstance$Config$EncryptionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -540,7 +540,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$Builder", + "name": "com.google.cloud.apihub.v1.ApiHubInstance$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -549,7 +549,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$DataType", + "name": "com.google.cloud.apihub.v1.ApiHubResource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -558,7 +558,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$DefinitionType", + "name": "com.google.cloud.apihub.v1.ApiHubResource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -567,7 +567,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Attribute$Scope", + "name": "com.google.cloud.apihub.v1.ApiMetadataList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -576,7 +576,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues", + "name": "com.google.cloud.apihub.v1.ApiMetadataList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -585,7 +585,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues$Builder", + "name": "com.google.cloud.apihub.v1.ApiOperation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -594,7 +594,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues$EnumAttributeValues", + "name": "com.google.cloud.apihub.v1.ApiOperation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -603,7 +603,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues$EnumAttributeValues$Builder", + "name": "com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -612,7 +612,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues$StringAttributeValues", + "name": "com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +621,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.AttributeValues$StringAttributeValues$Builder", + "name": "com.google.cloud.apihub.v1.Attribute", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +630,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateApiHubInstanceRequest", + "name": "com.google.cloud.apihub.v1.Attribute$AllowedValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +639,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateApiHubInstanceRequest$Builder", + "name": "com.google.cloud.apihub.v1.Attribute$AllowedValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +648,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateApiRequest", + "name": "com.google.cloud.apihub.v1.Attribute$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +657,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.Attribute$DataType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +666,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateAttributeRequest", + "name": "com.google.cloud.apihub.v1.Attribute$DefinitionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +675,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateAttributeRequest$Builder", + "name": "com.google.cloud.apihub.v1.Attribute$Scope", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +684,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateDependencyRequest", + "name": "com.google.cloud.apihub.v1.AttributeValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +693,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateDependencyRequest$Builder", + "name": "com.google.cloud.apihub.v1.AttributeValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +702,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateDeploymentRequest", + "name": "com.google.cloud.apihub.v1.AttributeValues$EnumAttributeValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +711,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateDeploymentRequest$Builder", + "name": "com.google.cloud.apihub.v1.AttributeValues$EnumAttributeValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +720,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateExternalApiRequest", + "name": "com.google.cloud.apihub.v1.AttributeValues$StringAttributeValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +729,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateExternalApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.AttributeValues$StringAttributeValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +738,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest", + "name": "com.google.cloud.apihub.v1.AuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +747,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest$Builder", + "name": "com.google.cloud.apihub.v1.AuthConfig$ApiKeyConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +756,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest", + "name": "com.google.cloud.apihub.v1.AuthConfig$ApiKeyConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +765,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest$Builder", + "name": "com.google.cloud.apihub.v1.AuthConfig$ApiKeyConfig$HttpElementLocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +774,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateSpecRequest", + "name": "com.google.cloud.apihub.v1.AuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +783,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateSpecRequest$Builder", + "name": "com.google.cloud.apihub.v1.AuthConfig$Oauth2ClientCredentialsConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +792,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateVersionRequest", + "name": "com.google.cloud.apihub.v1.AuthConfig$Oauth2ClientCredentialsConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +801,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.CreateVersionRequest$Builder", + "name": "com.google.cloud.apihub.v1.AuthConfig$UserPasswordConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +810,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Definition", + "name": "com.google.cloud.apihub.v1.AuthConfig$UserPasswordConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +819,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Definition$Builder", + "name": "com.google.cloud.apihub.v1.AuthType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +828,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Definition$Type", + "name": "com.google.cloud.apihub.v1.CollectApiDataRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +837,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteApiRequest", + "name": "com.google.cloud.apihub.v1.CollectApiDataRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +846,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.CollectApiDataResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +855,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteAttributeRequest", + "name": "com.google.cloud.apihub.v1.CollectApiDataResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +864,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteAttributeRequest$Builder", + "name": "com.google.cloud.apihub.v1.CollectionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +873,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteDependencyRequest", + "name": "com.google.cloud.apihub.v1.ConfigValueOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +882,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteDependencyRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigValueOption$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +891,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteDeploymentRequest", + "name": "com.google.cloud.apihub.v1.ConfigVariable", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +900,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteDeploymentRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigVariable$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +909,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteExternalApiRequest", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiIntValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +918,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteExternalApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiIntValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +927,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiSelectValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +936,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiSelectValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +945,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteSpecRequest", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiStringValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +954,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteSpecRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigVariable$MultiStringValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +963,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteVersionRequest", + "name": "com.google.cloud.apihub.v1.ConfigVariableTemplate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +972,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DeleteVersionRequest$Builder", + "name": "com.google.cloud.apihub.v1.ConfigVariableTemplate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +981,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Dependency", + "name": "com.google.cloud.apihub.v1.ConfigVariableTemplate$ValueType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +990,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Dependency$Builder", + "name": "com.google.cloud.apihub.v1.CreateApiHubInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +999,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Dependency$DiscoveryMode", + "name": "com.google.cloud.apihub.v1.CreateApiHubInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1008,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Dependency$State", + "name": "com.google.cloud.apihub.v1.CreateApiOperationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DependencyEntityReference", + "name": "com.google.cloud.apihub.v1.CreateApiOperationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DependencyEntityReference$Builder", + "name": "com.google.cloud.apihub.v1.CreateApiRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DependencyErrorDetail", + "name": "com.google.cloud.apihub.v1.CreateApiRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DependencyErrorDetail$Builder", + "name": "com.google.cloud.apihub.v1.CreateAttributeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DependencyErrorDetail$Error", + "name": "com.google.cloud.apihub.v1.CreateAttributeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Deployment", + "name": "com.google.cloud.apihub.v1.CreateCurationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Deployment$Builder", + "name": "com.google.cloud.apihub.v1.CreateCurationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DisablePluginRequest", + "name": "com.google.cloud.apihub.v1.CreateDependencyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.DisablePluginRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreateDependencyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Documentation", + "name": "com.google.cloud.apihub.v1.CreateDeploymentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Documentation$Builder", + "name": "com.google.cloud.apihub.v1.CreateDeploymentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.EnablePluginRequest", + "name": "com.google.cloud.apihub.v1.CreateExternalApiRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.EnablePluginRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreateExternalApiRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ExternalApi", + "name": "com.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ExternalApi$Builder", + "name": "com.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiHubInstanceRequest", + "name": "com.google.cloud.apihub.v1.CreatePluginInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiHubInstanceRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreatePluginInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiOperationRequest", + "name": "com.google.cloud.apihub.v1.CreatePluginRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiOperationRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreatePluginRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiRequest", + "name": "com.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetAttributeRequest", + "name": "com.google.cloud.apihub.v1.CreateSpecRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetAttributeRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreateSpecRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDefinitionRequest", + "name": "com.google.cloud.apihub.v1.CreateVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDefinitionRequest$Builder", + "name": "com.google.cloud.apihub.v1.CreateVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDependencyRequest", + "name": "com.google.cloud.apihub.v1.Curation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDependencyRequest$Builder", + "name": "com.google.cloud.apihub.v1.Curation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDeploymentRequest", + "name": "com.google.cloud.apihub.v1.Curation$ErrorCode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetDeploymentRequest$Builder", + "name": "com.google.cloud.apihub.v1.Curation$LastExecutionState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetExternalApiRequest", + "name": "com.google.cloud.apihub.v1.Curation$PluginInstanceActionID", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetExternalApiRequest$Builder", + "name": "com.google.cloud.apihub.v1.Curation$PluginInstanceActionID$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetHostProjectRegistrationRequest", + "name": "com.google.cloud.apihub.v1.CurationConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetHostProjectRegistrationRequest$Builder", + "name": "com.google.cloud.apihub.v1.CurationConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetPluginRequest", + "name": "com.google.cloud.apihub.v1.CurationConfig$CustomCuration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetPluginRequest$Builder", + "name": "com.google.cloud.apihub.v1.CurationConfig$CustomCuration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest", + "name": "com.google.cloud.apihub.v1.CurationType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest$Builder", + "name": "com.google.cloud.apihub.v1.Definition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetSpecContentsRequest", + "name": "com.google.cloud.apihub.v1.Definition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetSpecContentsRequest$Builder", + "name": "com.google.cloud.apihub.v1.Definition$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetSpecRequest", + "name": "com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetSpecRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetStyleGuideContentsRequest", + "name": "com.google.cloud.apihub.v1.DeleteApiOperationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetStyleGuideContentsRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteApiOperationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetStyleGuideRequest", + "name": "com.google.cloud.apihub.v1.DeleteApiRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetStyleGuideRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteApiRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetVersionRequest", + "name": "com.google.cloud.apihub.v1.DeleteAttributeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.GetVersionRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteAttributeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.HostProjectRegistration", + "name": "com.google.cloud.apihub.v1.DeleteCurationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.HostProjectRegistration$Builder", + "name": "com.google.cloud.apihub.v1.DeleteCurationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.HttpOperation", + "name": "com.google.cloud.apihub.v1.DeleteDependencyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.HttpOperation$Builder", + "name": "com.google.cloud.apihub.v1.DeleteDependencyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.HttpOperation$Method", + "name": "com.google.cloud.apihub.v1.DeleteDeploymentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Issue", + "name": "com.google.cloud.apihub.v1.DeleteDeploymentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Issue$Builder", + "name": "com.google.cloud.apihub.v1.DeleteExternalApiRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintResponse", + "name": "com.google.cloud.apihub.v1.DeleteExternalApiRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintResponse$Builder", + "name": "com.google.cloud.apihub.v1.DeletePluginInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintResponse$SummaryEntry", + "name": "com.google.cloud.apihub.v1.DeletePluginInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintResponse$SummaryEntry$Builder", + "name": "com.google.cloud.apihub.v1.DeletePluginRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintSpecRequest", + "name": "com.google.cloud.apihub.v1.DeletePluginRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintSpecRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LintState", + "name": "com.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Linter", + "name": "com.google.cloud.apihub.v1.DeleteSpecRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApiOperationsRequest", + "name": "com.google.cloud.apihub.v1.DeleteSpecRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApiOperationsRequest$Builder", + "name": "com.google.cloud.apihub.v1.DeleteVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApiOperationsResponse", + "name": "com.google.cloud.apihub.v1.DeleteVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApiOperationsResponse$Builder", + "name": "com.google.cloud.apihub.v1.Dependency", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApisRequest", + "name": "com.google.cloud.apihub.v1.Dependency$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApisRequest$Builder", + "name": "com.google.cloud.apihub.v1.Dependency$DiscoveryMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApisResponse", + "name": "com.google.cloud.apihub.v1.Dependency$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListApisResponse$Builder", + "name": "com.google.cloud.apihub.v1.DependencyEntityReference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListAttributesRequest", + "name": "com.google.cloud.apihub.v1.DependencyEntityReference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListAttributesRequest$Builder", + "name": "com.google.cloud.apihub.v1.DependencyErrorDetail", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListAttributesResponse", + "name": "com.google.cloud.apihub.v1.DependencyErrorDetail$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListAttributesResponse$Builder", + "name": "com.google.cloud.apihub.v1.DependencyErrorDetail$Error", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDependenciesRequest", + "name": "com.google.cloud.apihub.v1.Deployment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDependenciesRequest$Builder", + "name": "com.google.cloud.apihub.v1.Deployment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDependenciesResponse", + "name": "com.google.cloud.apihub.v1.DeploymentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDependenciesResponse$Builder", + "name": "com.google.cloud.apihub.v1.DeploymentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDeploymentsRequest", + "name": "com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDeploymentsRequest$Builder", + "name": "com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDeploymentsResponse", + "name": "com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListDeploymentsResponse$Builder", + "name": "com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListExternalApisRequest", + "name": "com.google.cloud.apihub.v1.DisablePluginRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListExternalApisRequest$Builder", + "name": "com.google.cloud.apihub.v1.DisablePluginRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListExternalApisResponse", + "name": "com.google.cloud.apihub.v1.DiscoveredApiObservation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListExternalApisResponse$Builder", + "name": "com.google.cloud.apihub.v1.DiscoveredApiObservation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest", + "name": "com.google.cloud.apihub.v1.DiscoveredApiObservation$SourceType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest$Builder", + "name": "com.google.cloud.apihub.v1.DiscoveredApiObservation$Style", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsResponse", + "name": "com.google.cloud.apihub.v1.DiscoveredApiOperation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsResponse$Builder", + "name": "com.google.cloud.apihub.v1.DiscoveredApiOperation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest", + "name": "com.google.cloud.apihub.v1.DiscoveredApiOperation$Classification", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest$Builder", + "name": "com.google.cloud.apihub.v1.DiscoveredApiOperation$MatchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsResponse", + "name": "com.google.cloud.apihub.v1.DiscoveredApiOperation$MatchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsResponse$Builder", + "name": "com.google.cloud.apihub.v1.Documentation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListSpecsRequest", + "name": "com.google.cloud.apihub.v1.Documentation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListSpecsRequest$Builder", + "name": "com.google.cloud.apihub.v1.EnablePluginInstanceActionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListSpecsResponse", + "name": "com.google.cloud.apihub.v1.EnablePluginInstanceActionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListSpecsResponse$Builder", + "name": "com.google.cloud.apihub.v1.EnablePluginInstanceActionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListVersionsRequest", + "name": "com.google.cloud.apihub.v1.EnablePluginInstanceActionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListVersionsRequest$Builder", + "name": "com.google.cloud.apihub.v1.EnablePluginRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListVersionsResponse", + "name": "com.google.cloud.apihub.v1.EnablePluginRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.ListVersionsResponse$Builder", + "name": "com.google.cloud.apihub.v1.Endpoint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceRequest", + "name": "com.google.cloud.apihub.v1.Endpoint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceRequest$Builder", + "name": "com.google.cloud.apihub.v1.ExecutePluginInstanceActionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceResponse", + "name": "com.google.cloud.apihub.v1.ExecutePluginInstanceActionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceResponse$Builder", + "name": "com.google.cloud.apihub.v1.ExecutePluginInstanceActionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest", + "name": "com.google.cloud.apihub.v1.ExecutePluginInstanceActionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest$Builder", + "name": "com.google.cloud.apihub.v1.ExecutionStatus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +1989,1303 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentResponse", + "name": "com.google.cloud.apihub.v1.ExecutionStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExecutionStatus$CurrentExecutionState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExecutionStatus$LastExecution", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExecutionStatus$LastExecution$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExecutionStatus$LastExecution$Result", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExternalApi", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ExternalApi$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GatewayType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiHubInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiHubInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetApiRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetAttributeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetAttributeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetCurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetCurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDefinitionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDefinitionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDependencyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDependencyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDiscoveredApiObservationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDiscoveredApiObservationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDiscoveredApiOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetDiscoveredApiOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetExternalApiRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetExternalApiRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetHostProjectRegistrationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetHostProjectRegistrationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetPluginInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetPluginInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetPluginRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetPluginRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetSpecContentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetSpecContentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetSpecRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetSpecRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetStyleGuideContentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetStyleGuideContentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetStyleGuideRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetStyleGuideRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GetVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GoogleServiceAccountConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.GoogleServiceAccountConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HostProjectRegistration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HostProjectRegistration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperation$Method", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$DataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$Header", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$Header$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$HttpRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$HttpRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$HttpResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$HttpResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$PathParam", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$PathParam$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$QueryParam", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.HttpOperationDetails$QueryParam$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.Issue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.Issue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintResponse$SummaryEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintResponse$SummaryEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintSpecRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintSpecRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LintState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.Linter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApiOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApiOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApiOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApiOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApisResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListApisResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListAttributesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListAttributesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListAttributesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListAttributesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListCurationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListCurationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListCurationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListCurationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDependenciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDependenciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDependenciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDependenciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDeploymentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDeploymentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDeploymentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDeploymentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiObservationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiObservationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiObservationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiObservationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListDiscoveredApiOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListExternalApisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListExternalApisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListExternalApisResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListExternalApisResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListHostProjectRegistrationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListPluginsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListSpecsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListSpecsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListSpecsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListSpecsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.ListVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupApiHubInstanceResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +3303,70 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails", + "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OperationDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OperationDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.Owner", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +3375,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails$Builder", + "name": "com.google.cloud.apihub.v1.Owner$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +3384,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OpenApiSpecDetails$Format", + "name": "com.google.cloud.apihub.v1.Path", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +3393,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OperationDetails", + "name": "com.google.cloud.apihub.v1.Path$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +3402,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OperationDetails$Builder", + "name": "com.google.cloud.apihub.v1.Plugin", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +3411,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OperationMetadata", + "name": "com.google.cloud.apihub.v1.Plugin$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +3420,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.OperationMetadata$Builder", + "name": "com.google.cloud.apihub.v1.Plugin$ConfigTemplate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +3429,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Owner", + "name": "com.google.cloud.apihub.v1.Plugin$ConfigTemplate$AuthConfigTemplate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +3438,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Owner$Builder", + "name": "com.google.cloud.apihub.v1.Plugin$ConfigTemplate$AuthConfigTemplate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +3447,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Path", + "name": "com.google.cloud.apihub.v1.Plugin$ConfigTemplate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +3456,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Path$Builder", + "name": "com.google.cloud.apihub.v1.Plugin$HostingService", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +3465,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Plugin", + "name": "com.google.cloud.apihub.v1.Plugin$HostingService$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +3474,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.apihub.v1.Plugin$Builder", + "name": "com.google.cloud.apihub.v1.Plugin$OwnershipType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2132,6 +3491,114 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.PluginActionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginActionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginActionConfig$TriggerMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginCategory", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstance$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstanceAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstanceAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstanceAction$ResourceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstanceAction$ResourceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.PluginInstanceAction$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.Point", "queryAllDeclaredConstructors": true, @@ -2258,6 +3725,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.Secret", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.Secret$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.Severity", "queryAllDeclaredConstructors": true, @@ -2267,6 +3752,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.SourceMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.SourceMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.SourceMetadata$PluginInstanceActionSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.SourceMetadata$PluginInstanceActionSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.SourceMetadata$SourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.Spec", "queryAllDeclaredConstructors": true, @@ -2330,6 +3860,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.SpecMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.SpecMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.StyleGuide", "queryAllDeclaredConstructors": true, @@ -2366,6 +3914,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.UpdateApiOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.UpdateApiOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.UpdateApiRequest", "queryAllDeclaredConstructors": true, @@ -2402,6 +3968,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.UpdateCurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.UpdateCurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.UpdateDependencyRequest", "queryAllDeclaredConstructors": true, @@ -2456,6 +4040,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.UpdatePluginInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.UpdatePluginInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.apihub.v1.UpdateSpecRequest", "queryAllDeclaredConstructors": true, @@ -2528,6 +4130,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.apihub.v1.VersionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.apihub.v1.VersionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.location.GetLocationRequest", "queryAllDeclaredConstructors": true, diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubClientTest.java index 521b2361c32f..c37f67184e94 100644 --- a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubClientTest.java +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubClientTest.java @@ -113,6 +113,11 @@ public void createApiTest() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -176,6 +181,11 @@ public void createApiTest2() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -239,6 +249,11 @@ public void getApiTest() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -298,6 +313,11 @@ public void getApiTest2() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -457,6 +477,11 @@ public void updateApiTest() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -478,6 +503,11 @@ public void updateApiTest() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -525,6 +555,11 @@ public void updateApiExceptionTest() throws Exception { .setApiStyle(AttributeValues.newBuilder().build()) .setSelectedVersion( VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]").toString()) + .setApiRequirements(AttributeValues.newBuilder().build()) + .setFingerprint("fingerprint-1375934236") + .addAllSourceMetadata(new ArrayList()) + .setApiFunctionalRequirements(AttributeValues.newBuilder().build()) + .setApiTechnicalRequirements(AttributeValues.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateApi(api, updateMask); @@ -634,6 +669,7 @@ public void createVersionTest() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -697,6 +733,7 @@ public void createVersionTest2() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -760,6 +797,7 @@ public void getVersionTest() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -819,6 +857,7 @@ public void getVersionTest2() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -980,6 +1019,7 @@ public void updateVersionTest() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1001,6 +1041,7 @@ public void updateVersionTest() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1048,6 +1089,7 @@ public void updateVersionExceptionTest() throws Exception { .putAllAttributes(new HashMap()) .setSelectedDeployment( DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllSourceMetadata(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateVersion(version, updateMask); @@ -1155,6 +1197,7 @@ public void createSpecTest() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1214,6 +1257,7 @@ public void createSpecTest2() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1275,6 +1319,7 @@ public void getSpecTest() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1330,6 +1375,7 @@ public void getSpecTest2() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1581,6 +1627,7 @@ public void updateSpecTest() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1598,6 +1645,7 @@ public void updateSpecTest() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1641,6 +1689,7 @@ public void updateSpecExceptionTest() throws Exception { .setLintResponse(LintResponse.newBuilder().build()) .putAllAttributes(new HashMap()) .setDocumentation(Documentation.newBuilder().build()) + .addAllSourceMetadata(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSpec(spec, updateMask); @@ -1732,6 +1781,122 @@ public void deleteSpecExceptionTest2() throws Exception { } } + @Test + public void createApiOperationTest() throws Exception { + ApiOperation expectedResponse = + ApiOperation.newBuilder() + .setName( + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]") + .toString()) + .setSpec( + SpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString()) + .setDetails(OperationDetails.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + VersionName parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiOperation apiOperation = ApiOperation.newBuilder().build(); + String apiOperationId = "apiOperationId-2124555672"; + + ApiOperation actualResponse = client.createApiOperation(parent, apiOperation, apiOperationId); + 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 createApiOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VersionName parent = VersionName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]"); + ApiOperation apiOperation = ApiOperation.newBuilder().build(); + String apiOperationId = "apiOperationId-2124555672"; + client.createApiOperation(parent, apiOperation, apiOperationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApiOperationTest2() throws Exception { + ApiOperation expectedResponse = + ApiOperation.newBuilder() + .setName( + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]") + .toString()) + .setSpec( + SpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString()) + .setDetails(OperationDetails.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + ApiOperation apiOperation = ApiOperation.newBuilder().build(); + String apiOperationId = "apiOperationId-2124555672"; + + ApiOperation actualResponse = client.createApiOperation(parent, apiOperation, apiOperationId); + 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 createApiOperationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-1179/locations/location-1179/apis/api-1179/versions/version-1179"; + ApiOperation apiOperation = ApiOperation.newBuilder().build(); + String apiOperationId = "apiOperationId-2124555672"; + client.createApiOperation(parent, apiOperation, apiOperationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getApiOperationTest() throws Exception { ApiOperation expectedResponse = @@ -1745,6 +1910,7 @@ public void getApiOperationTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1799,6 +1965,7 @@ public void getApiOperationTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -1942,6 +2109,170 @@ public void listApiOperationsExceptionTest2() throws Exception { } } + @Test + public void updateApiOperationTest() throws Exception { + ApiOperation expectedResponse = + ApiOperation.newBuilder() + .setName( + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]") + .toString()) + .setSpec( + SpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString()) + .setDetails(OperationDetails.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ApiOperation apiOperation = + ApiOperation.newBuilder() + .setName( + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]") + .toString()) + .setSpec( + SpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString()) + .setDetails(OperationDetails.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ApiOperation actualResponse = client.updateApiOperation(apiOperation, 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 updateApiOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiOperation apiOperation = + ApiOperation.newBuilder() + .setName( + ApiOperationName.of( + "[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]") + .toString()) + .setSpec( + SpecName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[SPEC]").toString()) + .setDetails(OperationDetails.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApiOperation(apiOperation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiOperationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ApiOperationName name = + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]"); + + client.deleteApiOperation(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 deleteApiOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiOperationName name = + ApiOperationName.of("[PROJECT]", "[LOCATION]", "[API]", "[VERSION]", "[OPERATION]"); + client.deleteApiOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteApiOperationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2438/locations/location-2438/apis/api-2438/versions/version-2438/operations/operation-2438"; + + client.deleteApiOperation(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 deleteApiOperationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2438/locations/location-2438/apis/api-2438/versions/version-2438/operations/operation-2438"; + client.deleteApiOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getDefinitionTest() throws Exception { Definition expectedResponse = @@ -2065,6 +2396,11 @@ public void createDeploymentTest() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); mockService.addResponse(expectedResponse); @@ -2125,6 +2461,11 @@ public void createDeploymentTest2() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); mockService.addResponse(expectedResponse); @@ -2185,6 +2526,11 @@ public void getDeploymentTest() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); mockService.addResponse(expectedResponse); @@ -2241,6 +2587,11 @@ public void getDeploymentTest2() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); mockService.addResponse(expectedResponse); @@ -2397,6 +2748,11 @@ public void updateDeploymentTest() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); mockService.addResponse(expectedResponse); @@ -2415,6 +2771,11 @@ public void updateDeploymentTest() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -2459,6 +2820,11 @@ public void updateDeploymentExceptionTest() throws Exception { .setSlo(AttributeValues.newBuilder().build()) .setEnvironment(AttributeValues.newBuilder().build()) .putAllAttributes(new HashMap()) + .addAllSourceMetadata(new ArrayList()) + .setManagementUrl(AttributeValues.newBuilder().build()) + .setSourceUri(AttributeValues.newBuilder().build()) + .setSourceProject("sourceProject-214747522") + .setSourceEnvironment("sourceEnvironment1420157688") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateDeployment(deployment, updateMask); diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCollectClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCollectClientTest.java new file mode 100644 index 000000000000..c97ef6140118 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCollectClientTest.java @@ -0,0 +1,303 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubCollectClient.ListLocationsPagedResponse; + +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.apihub.v1.stub.HttpJsonApiHubCollectStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +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 ApiHubCollectClientTest { + private static MockHttpService mockService; + private static ApiHubCollectClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonApiHubCollectStub.getMethodDescriptors(), + ApiHubCollectSettings.getDefaultEndpoint()); + ApiHubCollectSettings settings = + ApiHubCollectSettings.newBuilder() + .setTransportChannelProvider( + ApiHubCollectSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ApiHubCollectClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void collectApiDataTest() throws Exception { + CollectApiDataResponse expectedResponse = CollectApiDataResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("collectApiDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + CollectionType collectionType = CollectionType.forNumber(0); + ApiData apiData = ApiData.newBuilder().build(); + + CollectApiDataResponse actualResponse = + client.collectApiDataAsync(location, collectionType, apiData).get(); + 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 collectApiDataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName location = LocationName.of("[PROJECT]", "[LOCATION]"); + CollectionType collectionType = CollectionType.forNumber(0); + ApiData apiData = ApiData.newBuilder().build(); + client.collectApiDataAsync(location, collectionType, apiData).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void collectApiDataTest2() throws Exception { + CollectApiDataResponse expectedResponse = CollectApiDataResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("collectApiDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String location = "projects/project-7132/locations/location-7132"; + CollectionType collectionType = CollectionType.forNumber(0); + ApiData apiData = ApiData.newBuilder().build(); + + CollectApiDataResponse actualResponse = + client.collectApiDataAsync(location, collectionType, apiData).get(); + 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 collectApiDataExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String location = "projects/project-7132/locations/location-7132"; + CollectionType collectionType = CollectionType.forNumber(0); + ApiData apiData = ApiData.newBuilder().build(); + client.collectApiDataAsync(location, collectionType, apiData).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCurateClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCurateClientTest.java new file mode 100644 index 000000000000..76c792e1b868 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubCurateClientTest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListCurationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubCurateClient.ListLocationsPagedResponse; + +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.apihub.v1.stub.HttpJsonApiHubCurateStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +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 ApiHubCurateClientTest { + private static MockHttpService mockService; + private static ApiHubCurateClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonApiHubCurateStub.getMethodDescriptors(), + ApiHubCurateSettings.getDefaultEndpoint()); + ApiHubCurateSettings settings = + ApiHubCurateSettings.newBuilder() + .setTransportChannelProvider( + ApiHubCurateSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ApiHubCurateClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createCurationTest() throws Exception { + Curation expectedResponse = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Curation curation = Curation.newBuilder().build(); + String curationId = "curationId1428017328"; + + Curation actualResponse = client.createCuration(parent, curation, curationId); + 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 createCurationExceptionTest() 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]"); + Curation curation = Curation.newBuilder().build(); + String curationId = "curationId1428017328"; + client.createCuration(parent, curation, curationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCurationTest2() throws Exception { + Curation expectedResponse = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Curation curation = Curation.newBuilder().build(); + String curationId = "curationId1428017328"; + + Curation actualResponse = client.createCuration(parent, curation, curationId); + 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 createCurationExceptionTest2() 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"; + Curation curation = Curation.newBuilder().build(); + String curationId = "curationId1428017328"; + client.createCuration(parent, curation, curationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCurationTest() throws Exception { + Curation expectedResponse = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]"); + + Curation actualResponse = client.getCuration(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 getCurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]"); + client.getCuration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCurationTest2() throws Exception { + Curation expectedResponse = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7020/locations/location-7020/curations/curation-7020"; + + Curation actualResponse = client.getCuration(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 getCurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7020/locations/location-7020/curations/curation-7020"; + client.getCuration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCurationsTest() throws Exception { + Curation responsesElement = Curation.newBuilder().build(); + ListCurationsResponse expectedResponse = + ListCurationsResponse.newBuilder() + .setNextPageToken("") + .addAllCurations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCurationsPagedResponse pagedListResponse = client.listCurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCurationsList().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 listCurationsExceptionTest() 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.listCurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCurationsTest2() throws Exception { + Curation responsesElement = Curation.newBuilder().build(); + ListCurationsResponse expectedResponse = + ListCurationsResponse.newBuilder() + .setNextPageToken("") + .addAllCurations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListCurationsPagedResponse pagedListResponse = client.listCurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCurationsList().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 listCurationsExceptionTest2() 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.listCurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCurationTest() throws Exception { + Curation expectedResponse = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Curation curation = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Curation actualResponse = client.updateCuration(curation, 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 updateCurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Curation curation = + Curation.newBuilder() + .setName(CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setEndpoint(Endpoint.newBuilder().build()) + .addAllPluginInstanceActions(new ArrayList()) + .setLastExecutionErrorMessage("lastExecutionErrorMessage1464188705") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCuration(curation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCurationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]"); + + client.deleteCuration(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 deleteCurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CurationName name = CurationName.of("[PROJECT]", "[LOCATION]", "[CURATION]"); + client.deleteCuration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCurationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7020/locations/location-7020/curations/curation-7020"; + + client.deleteCuration(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 deleteCurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7020/locations/location-7020/curations/curation-7020"; + client.deleteCuration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClientTest.java new file mode 100644 index 000000000000..ca22a6b64f62 --- /dev/null +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubDiscoveryClientTest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.v1; + +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiObservationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListDiscoveredApiOperationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubDiscoveryClient.ListLocationsPagedResponse; + +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.apihub.v1.stub.HttpJsonApiHubDiscoveryStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +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 ApiHubDiscoveryClientTest { + private static MockHttpService mockService; + private static ApiHubDiscoveryClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonApiHubDiscoveryStub.getMethodDescriptors(), + ApiHubDiscoverySettings.getDefaultEndpoint()); + ApiHubDiscoverySettings settings = + ApiHubDiscoverySettings.newBuilder() + .setTransportChannelProvider( + ApiHubDiscoverySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ApiHubDiscoveryClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listDiscoveredApiObservationsTest() throws Exception { + DiscoveredApiObservation responsesElement = DiscoveredApiObservation.newBuilder().build(); + ListDiscoveredApiObservationsResponse expectedResponse = + ListDiscoveredApiObservationsResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredApiObservations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDiscoveredApiObservationsPagedResponse pagedListResponse = + client.listDiscoveredApiObservations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDiscoveredApiObservationsList().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 listDiscoveredApiObservationsExceptionTest() 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.listDiscoveredApiObservations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDiscoveredApiObservationsTest2() throws Exception { + DiscoveredApiObservation responsesElement = DiscoveredApiObservation.newBuilder().build(); + ListDiscoveredApiObservationsResponse expectedResponse = + ListDiscoveredApiObservationsResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredApiObservations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDiscoveredApiObservationsPagedResponse pagedListResponse = + client.listDiscoveredApiObservations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDiscoveredApiObservationsList().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 listDiscoveredApiObservationsExceptionTest2() 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.listDiscoveredApiObservations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredApiObservationTest() throws Exception { + DiscoveredApiObservation expectedResponse = + DiscoveredApiObservation.newBuilder() + .setName( + DiscoveredApiObservationName.of( + "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]") + .toString()) + .addAllServerIps(new ArrayList()) + .setHostname("hostname-299803597") + .setLastEventDetectedTime(Timestamp.newBuilder().build()) + .addAllSourceLocations(new ArrayList()) + .setApiOperationCount(1601960978) + .setOrigin("origin-1008619738") + .addAllSourceTypes(new ArrayList()) + .setKnownOperationsCount(1870354552) + .setUnknownOperationsCount(2105638481) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceMetadata(SourceMetadata.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredApiObservationName name = + DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]"); + + DiscoveredApiObservation actualResponse = client.getDiscoveredApiObservation(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 getDiscoveredApiObservationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredApiObservationName name = + DiscoveredApiObservationName.of( + "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]"); + client.getDiscoveredApiObservation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredApiObservationTest2() throws Exception { + DiscoveredApiObservation expectedResponse = + DiscoveredApiObservation.newBuilder() + .setName( + DiscoveredApiObservationName.of( + "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]") + .toString()) + .addAllServerIps(new ArrayList()) + .setHostname("hostname-299803597") + .setLastEventDetectedTime(Timestamp.newBuilder().build()) + .addAllSourceLocations(new ArrayList()) + .setApiOperationCount(1601960978) + .setOrigin("origin-1008619738") + .addAllSourceTypes(new ArrayList()) + .setKnownOperationsCount(1870354552) + .setUnknownOperationsCount(2105638481) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceMetadata(SourceMetadata.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4863/locations/location-4863/discoveredApiObservations/discoveredApiObservation-4863"; + + DiscoveredApiObservation actualResponse = client.getDiscoveredApiObservation(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 getDiscoveredApiObservationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4863/locations/location-4863/discoveredApiObservations/discoveredApiObservation-4863"; + client.getDiscoveredApiObservation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDiscoveredApiOperationsTest() throws Exception { + DiscoveredApiOperation responsesElement = DiscoveredApiOperation.newBuilder().build(); + ListDiscoveredApiOperationsResponse expectedResponse = + ListDiscoveredApiOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredApiOperations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredApiObservationName parent = + DiscoveredApiObservationName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]"); + + ListDiscoveredApiOperationsPagedResponse pagedListResponse = + client.listDiscoveredApiOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredApiOperationsList().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 listDiscoveredApiOperationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredApiObservationName parent = + DiscoveredApiObservationName.of( + "[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]"); + client.listDiscoveredApiOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDiscoveredApiOperationsTest2() throws Exception { + DiscoveredApiOperation responsesElement = DiscoveredApiOperation.newBuilder().build(); + ListDiscoveredApiOperationsResponse expectedResponse = + ListDiscoveredApiOperationsResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredApiOperations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-8302/locations/location-8302/discoveredApiObservations/discoveredApiObservation-8302"; + + ListDiscoveredApiOperationsPagedResponse pagedListResponse = + client.listDiscoveredApiOperations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredApiOperationsList().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 listDiscoveredApiOperationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-8302/locations/location-8302/discoveredApiObservations/discoveredApiObservation-8302"; + client.listDiscoveredApiOperations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredApiOperationTest() throws Exception { + DiscoveredApiOperation expectedResponse = + DiscoveredApiOperation.newBuilder() + .setName( + DiscoveredApiOperationName.of( + "[PROJECT]", + "[LOCATION]", + "[DISCOVERED_API_OBSERVATION]", + "[DISCOVERED_API_OPERATION]") + .toString()) + .setFirstSeenTime(Timestamp.newBuilder().build()) + .setLastSeenTime(Timestamp.newBuilder().build()) + .setCount(94851343) + .addAllMatchResults(new ArrayList()) + .setSourceMetadata(SourceMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredApiOperationName name = + DiscoveredApiOperationName.of( + "[PROJECT]", + "[LOCATION]", + "[DISCOVERED_API_OBSERVATION]", + "[DISCOVERED_API_OPERATION]"); + + DiscoveredApiOperation actualResponse = client.getDiscoveredApiOperation(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 getDiscoveredApiOperationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredApiOperationName name = + DiscoveredApiOperationName.of( + "[PROJECT]", + "[LOCATION]", + "[DISCOVERED_API_OBSERVATION]", + "[DISCOVERED_API_OPERATION]"); + client.getDiscoveredApiOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredApiOperationTest2() throws Exception { + DiscoveredApiOperation expectedResponse = + DiscoveredApiOperation.newBuilder() + .setName( + DiscoveredApiOperationName.of( + "[PROJECT]", + "[LOCATION]", + "[DISCOVERED_API_OBSERVATION]", + "[DISCOVERED_API_OPERATION]") + .toString()) + .setFirstSeenTime(Timestamp.newBuilder().build()) + .setLastSeenTime(Timestamp.newBuilder().build()) + .setCount(94851343) + .addAllMatchResults(new ArrayList()) + .setSourceMetadata(SourceMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2009/locations/location-2009/discoveredApiObservations/discoveredApiObservation-2009/discoveredApiOperations/discoveredApiOperation-2009"; + + DiscoveredApiOperation actualResponse = client.getDiscoveredApiOperation(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 getDiscoveredApiOperationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2009/locations/location-2009/discoveredApiObservations/discoveredApiObservation-2009/discoveredApiOperations/discoveredApiOperation-2009"; + client.getDiscoveredApiOperation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubPluginClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubPluginClientTest.java index 3ae197b38b60..89ddcf15c4c1 100644 --- a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubPluginClientTest.java +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ApiHubPluginClientTest.java @@ -17,6 +17,8 @@ package com.google.cloud.apihub.v1; import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListLocationsPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginInstancesPagedResponse; +import static com.google.cloud.apihub.v1.ApiHubPluginClient.ListPluginsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; @@ -33,11 +35,17 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -89,6 +97,14 @@ public void getPluginTest() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -136,6 +152,14 @@ public void getPluginTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -183,6 +207,14 @@ public void enablePluginTest() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -230,6 +262,14 @@ public void enablePluginTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -277,6 +317,14 @@ public void disablePluginTest() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -324,6 +372,14 @@ public void disablePluginTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(AttributeValues.newBuilder().build()) .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -363,6 +419,1142 @@ public void disablePluginExceptionTest2() throws Exception { } } + @Test + public void createPluginTest() throws Exception { + Plugin expectedResponse = + Plugin.newBuilder() + .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) + .setDisplayName("displayName1714148973") + .setType(AttributeValues.newBuilder().build()) + .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Plugin plugin = Plugin.newBuilder().build(); + String pluginId = "pluginId-1859618898"; + + Plugin actualResponse = client.createPlugin(parent, plugin, pluginId); + 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 createPluginExceptionTest() 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]"); + Plugin plugin = Plugin.newBuilder().build(); + String pluginId = "pluginId-1859618898"; + client.createPlugin(parent, plugin, pluginId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPluginTest2() throws Exception { + Plugin expectedResponse = + Plugin.newBuilder() + .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) + .setDisplayName("displayName1714148973") + .setType(AttributeValues.newBuilder().build()) + .setDescription("description-1724546052") + .setHostingService(Plugin.HostingService.newBuilder().build()) + .addAllActionsConfig(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setPluginCategory(PluginCategory.forNumber(0)) + .setConfigTemplate(Plugin.ConfigTemplate.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setGatewayType(GatewayType.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Plugin plugin = Plugin.newBuilder().build(); + String pluginId = "pluginId-1859618898"; + + Plugin actualResponse = client.createPlugin(parent, plugin, pluginId); + 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 createPluginExceptionTest2() 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"; + Plugin plugin = Plugin.newBuilder().build(); + String pluginId = "pluginId-1859618898"; + client.createPlugin(parent, plugin, pluginId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPluginsTest() throws Exception { + Plugin responsesElement = Plugin.newBuilder().build(); + ListPluginsResponse expectedResponse = + ListPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllPlugins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPluginsPagedResponse pagedListResponse = client.listPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPluginsList().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 listPluginsExceptionTest() 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.listPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPluginsTest2() throws Exception { + Plugin responsesElement = Plugin.newBuilder().build(); + ListPluginsResponse expectedResponse = + ListPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllPlugins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPluginsPagedResponse pagedListResponse = client.listPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPluginsList().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 listPluginsExceptionTest2() 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.listPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePluginTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + + client.deletePluginAsync(name).get(); + + 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 deletePluginExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + client.deletePluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePluginTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1258/locations/location-1258/plugins/plugin-1258"; + + client.deletePluginAsync(name).get(); + + 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 deletePluginExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1258/locations/location-1258/plugins/plugin-1258"; + client.deletePluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPluginInstanceTest() throws Exception { + PluginInstance expectedResponse = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPluginInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + PluginInstance pluginInstance = PluginInstance.newBuilder().build(); + String pluginInstanceId = "pluginInstanceId-1741818845"; + + PluginInstance actualResponse = + client.createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId).get(); + 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 createPluginInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + PluginInstance pluginInstance = PluginInstance.newBuilder().build(); + String pluginInstanceId = "pluginInstanceId-1741818845"; + client.createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createPluginInstanceTest2() throws Exception { + PluginInstance expectedResponse = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPluginInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7467/locations/location-7467/plugins/plugin-7467"; + PluginInstance pluginInstance = PluginInstance.newBuilder().build(); + String pluginInstanceId = "pluginInstanceId-1741818845"; + + PluginInstance actualResponse = + client.createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId).get(); + 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 createPluginInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7467/locations/location-7467/plugins/plugin-7467"; + PluginInstance pluginInstance = PluginInstance.newBuilder().build(); + String pluginInstanceId = "pluginInstanceId-1741818845"; + client.createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void executePluginInstanceActionTest() throws Exception { + ExecutePluginInstanceActionResponse expectedResponse = + ExecutePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("executePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); + + ExecutePluginInstanceActionResponse actualResponse = + client.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); + 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 executePluginInstanceActionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); + client.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void executePluginInstanceActionTest2() throws Exception { + ExecutePluginInstanceActionResponse expectedResponse = + ExecutePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("executePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); + + ExecutePluginInstanceActionResponse actualResponse = + client.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); + 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 executePluginInstanceActionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); + client.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getPluginInstanceTest() throws Exception { + PluginInstance expectedResponse = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + mockService.addResponse(expectedResponse); + + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + + PluginInstance actualResponse = client.getPluginInstance(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 getPluginInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + client.getPluginInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPluginInstanceTest2() throws Exception { + PluginInstance expectedResponse = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + + PluginInstance actualResponse = client.getPluginInstance(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 getPluginInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + client.getPluginInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPluginInstancesTest() throws Exception { + PluginInstance responsesElement = PluginInstance.newBuilder().build(); + ListPluginInstancesResponse expectedResponse = + ListPluginInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllPluginInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + + ListPluginInstancesPagedResponse pagedListResponse = client.listPluginInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPluginInstancesList().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 listPluginInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); + client.listPluginInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPluginInstancesTest2() throws Exception { + PluginInstance responsesElement = PluginInstance.newBuilder().build(); + ListPluginInstancesResponse expectedResponse = + ListPluginInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllPluginInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7467/locations/location-7467/plugins/plugin-7467"; + + ListPluginInstancesPagedResponse pagedListResponse = client.listPluginInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPluginInstancesList().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 listPluginInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7467/locations/location-7467/plugins/plugin-7467"; + client.listPluginInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enablePluginInstanceActionTest() throws Exception { + EnablePluginInstanceActionResponse expectedResponse = + EnablePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enablePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + String actionId = "actionId-1656172047"; + + EnablePluginInstanceActionResponse actualResponse = + client.enablePluginInstanceActionAsync(name, actionId).get(); + 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 enablePluginInstanceActionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + String actionId = "actionId-1656172047"; + client.enablePluginInstanceActionAsync(name, actionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void enablePluginInstanceActionTest2() throws Exception { + EnablePluginInstanceActionResponse expectedResponse = + EnablePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enablePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + String actionId = "actionId-1656172047"; + + EnablePluginInstanceActionResponse actualResponse = + client.enablePluginInstanceActionAsync(name, actionId).get(); + 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 enablePluginInstanceActionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + String actionId = "actionId-1656172047"; + client.enablePluginInstanceActionAsync(name, actionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void disablePluginInstanceActionTest() throws Exception { + DisablePluginInstanceActionResponse expectedResponse = + DisablePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disablePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + String actionId = "actionId-1656172047"; + + DisablePluginInstanceActionResponse actualResponse = + client.disablePluginInstanceActionAsync(name, actionId).get(); + 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 disablePluginInstanceActionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + String actionId = "actionId-1656172047"; + client.disablePluginInstanceActionAsync(name, actionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void disablePluginInstanceActionTest2() throws Exception { + DisablePluginInstanceActionResponse expectedResponse = + DisablePluginInstanceActionResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disablePluginInstanceActionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + String actionId = "actionId-1656172047"; + + DisablePluginInstanceActionResponse actualResponse = + client.disablePluginInstanceActionAsync(name, actionId).get(); + 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 disablePluginInstanceActionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + String actionId = "actionId-1656172047"; + client.disablePluginInstanceActionAsync(name, actionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updatePluginInstanceTest() throws Exception { + PluginInstance expectedResponse = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + mockService.addResponse(expectedResponse); + + PluginInstance pluginInstance = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + PluginInstance actualResponse = client.updatePluginInstance(pluginInstance, 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 updatePluginInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstance pluginInstance = + PluginInstance.newBuilder() + .setName( + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") + .toString()) + .setDisplayName("displayName1714148973") + .setAuthConfig(AuthConfig.newBuilder().build()) + .putAllAdditionalConfig(new HashMap()) + .setErrorMessage("errorMessage1203236063") + .addAllActions(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setSourceProjectId("sourceProjectId-213936071") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePluginInstance(pluginInstance, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePluginInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePluginInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + + client.deletePluginInstanceAsync(name).get(); + + 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 deletePluginInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PluginInstanceName name = + PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); + client.deletePluginInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deletePluginInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePluginInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + + client.deletePluginInstanceAsync(name).get(); + + 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 deletePluginInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-528/locations/location-528/plugins/plugin-528/instances/instance-528"; + client.deletePluginInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ProvisioningClientTest.java b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ProvisioningClientTest.java index d7a7524af249..e5e37e73f323 100644 --- a/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ProvisioningClientTest.java +++ b/java-apihub/google-cloud-apihub/src/test/java/com/google/cloud/apihub/v1/ProvisioningClientTest.java @@ -35,6 +35,7 @@ import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.Any; +import com.google.protobuf.Empty; import com.google.protobuf.Timestamp; import java.io.IOException; import java.util.Arrays; @@ -206,6 +207,100 @@ public void createApiHubInstanceExceptionTest2() throws Exception { } } + @Test + public void deleteApiHubInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApiHubInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApiHubInstanceName name = + ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]"); + + client.deleteApiHubInstanceAsync(name).get(); + + 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 deleteApiHubInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApiHubInstanceName name = + ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]"); + client.deleteApiHubInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteApiHubInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApiHubInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3113/locations/location-3113/apiHubInstances/apiHubInstance-3113"; + + client.deleteApiHubInstanceAsync(name).get(); + + 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 deleteApiHubInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3113/locations/location-3113/apiHubInstances/apiHubInstance-3113"; + client.deleteApiHubInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void getApiHubInstanceTest() throws Exception { ApiHubInstance expectedResponse = diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadata.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadata.java new file mode 100644 index 000000000000..3d2d4e45bbd5 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadata.java @@ -0,0 +1,2123 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *

    + * The API metadata.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.APIMetadata} + */ +public final class APIMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.APIMetadata) + APIMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use APIMetadata.newBuilder() to construct. + private APIMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private APIMetadata() { + versions_ = java.util.Collections.emptyList(); + originalId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new APIMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_APIMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_APIMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.APIMetadata.class, + com.google.cloud.apihub.v1.APIMetadata.Builder.class); + } + + private int bitField0_; + public static final int API_FIELD_NUMBER = 1; + private com.google.cloud.apihub.v1.Api api_; + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the api field is set. + */ + @java.lang.Override + public boolean hasApi() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The api. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Api getApi() { + return api_ == null ? com.google.cloud.apihub.v1.Api.getDefaultInstance() : api_; + } + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiOrBuilder getApiOrBuilder() { + return api_ == null ? com.google.cloud.apihub.v1.Api.getDefaultInstance() : api_; + } + + public static final int VERSIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List versions_; + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getVersionsList() { + return versions_; + } + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.VersionMetadata getVersions(int index) { + return versions_.get(index); + } + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.VersionMetadataOrBuilder getVersionsOrBuilder(int index) { + return versions_.get(index); + } + + public static final int ORIGINAL_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object originalId_ = ""; + + /** + * + * + *
    +   * Optional. The unique identifier of the API in the system where it was
    +   * originally created.
    +   * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + @java.lang.Override + public java.lang.String getOriginalId() { + java.lang.Object ref = originalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The unique identifier of the API in the system where it was
    +   * originally created.
    +   * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOriginalIdBytes() { + java.lang.Object ref = originalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORIGINAL_CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp originalCreateTime_; + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + @java.lang.Override + public boolean hasOriginalCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOriginalCreateTime() { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder() { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + + public static final int ORIGINAL_UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp originalUpdateTime_; + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + @java.lang.Override + public boolean hasOriginalUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOriginalUpdateTime() { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder() { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getApi()); + } + for (int i = 0; i < versions_.size(); i++) { + output.writeMessage(2, versions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, originalId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getOriginalCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getOriginalUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getApi()); + } + for (int i = 0; i < versions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, versions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, originalId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOriginalCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOriginalUpdateTime()); + } + 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.apihub.v1.APIMetadata)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.APIMetadata other = (com.google.cloud.apihub.v1.APIMetadata) obj; + + if (hasApi() != other.hasApi()) return false; + if (hasApi()) { + if (!getApi().equals(other.getApi())) return false; + } + if (!getVersionsList().equals(other.getVersionsList())) return false; + if (!getOriginalId().equals(other.getOriginalId())) return false; + if (hasOriginalCreateTime() != other.hasOriginalCreateTime()) return false; + if (hasOriginalCreateTime()) { + if (!getOriginalCreateTime().equals(other.getOriginalCreateTime())) return false; + } + if (hasOriginalUpdateTime() != other.hasOriginalUpdateTime()) return false; + if (hasOriginalUpdateTime()) { + if (!getOriginalUpdateTime().equals(other.getOriginalUpdateTime())) 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 (hasApi()) { + hash = (37 * hash) + API_FIELD_NUMBER; + hash = (53 * hash) + getApi().hashCode(); + } + if (getVersionsCount() > 0) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersionsList().hashCode(); + } + hash = (37 * hash) + ORIGINAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getOriginalId().hashCode(); + if (hasOriginalCreateTime()) { + hash = (37 * hash) + ORIGINAL_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOriginalCreateTime().hashCode(); + } + if (hasOriginalUpdateTime()) { + hash = (37 * hash) + ORIGINAL_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOriginalUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.APIMetadata 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.apihub.v1.APIMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom( + 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.apihub.v1.APIMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom( + java.io.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.apihub.v1.APIMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseDelimitedFrom( + java.io.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.apihub.v1.APIMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.APIMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.APIMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The API metadata.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.APIMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.APIMetadata) + com.google.cloud.apihub.v1.APIMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_APIMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_APIMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.APIMetadata.class, + com.google.cloud.apihub.v1.APIMetadata.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.APIMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getApiFieldBuilder(); + getVersionsFieldBuilder(); + getOriginalCreateTimeFieldBuilder(); + getOriginalUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + api_ = null; + if (apiBuilder_ != null) { + apiBuilder_.dispose(); + apiBuilder_ = null; + } + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + } else { + versions_ = null; + versionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + originalId_ = ""; + originalCreateTime_ = null; + if (originalCreateTimeBuilder_ != null) { + originalCreateTimeBuilder_.dispose(); + originalCreateTimeBuilder_ = null; + } + originalUpdateTime_ = null; + if (originalUpdateTimeBuilder_ != null) { + originalUpdateTimeBuilder_.dispose(); + originalUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_APIMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.APIMetadata getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.APIMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.APIMetadata build() { + com.google.cloud.apihub.v1.APIMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.APIMetadata buildPartial() { + com.google.cloud.apihub.v1.APIMetadata result = + new com.google.cloud.apihub.v1.APIMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.APIMetadata result) { + if (versionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.apihub.v1.APIMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.api_ = apiBuilder_ == null ? api_ : apiBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.originalId_ = originalId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.originalCreateTime_ = + originalCreateTimeBuilder_ == null + ? originalCreateTime_ + : originalCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.originalUpdateTime_ = + originalUpdateTimeBuilder_ == null + ? originalUpdateTime_ + : originalUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.APIMetadata) { + return mergeFrom((com.google.cloud.apihub.v1.APIMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.APIMetadata other) { + if (other == com.google.cloud.apihub.v1.APIMetadata.getDefaultInstance()) return this; + if (other.hasApi()) { + mergeApi(other.getApi()); + } + if (versionsBuilder_ == null) { + if (!other.versions_.isEmpty()) { + if (versions_.isEmpty()) { + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVersionsIsMutable(); + versions_.addAll(other.versions_); + } + onChanged(); + } + } else { + if (!other.versions_.isEmpty()) { + if (versionsBuilder_.isEmpty()) { + versionsBuilder_.dispose(); + versionsBuilder_ = null; + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + versionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionsFieldBuilder() + : null; + } else { + versionsBuilder_.addAllMessages(other.versions_); + } + } + } + if (!other.getOriginalId().isEmpty()) { + originalId_ = other.originalId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasOriginalCreateTime()) { + mergeOriginalCreateTime(other.getOriginalCreateTime()); + } + if (other.hasOriginalUpdateTime()) { + mergeOriginalUpdateTime(other.getOriginalUpdateTime()); + } + 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(getApiFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.apihub.v1.VersionMetadata m = + input.readMessage( + com.google.cloud.apihub.v1.VersionMetadata.parser(), extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + originalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getOriginalCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getOriginalUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + 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.apihub.v1.Api api_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Api, + com.google.cloud.apihub.v1.Api.Builder, + com.google.cloud.apihub.v1.ApiOrBuilder> + apiBuilder_; + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the api field is set. + */ + public boolean hasApi() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The api. + */ + public com.google.cloud.apihub.v1.Api getApi() { + if (apiBuilder_ == null) { + return api_ == null ? com.google.cloud.apihub.v1.Api.getDefaultInstance() : api_; + } else { + return apiBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi(com.google.cloud.apihub.v1.Api value) { + if (apiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + api_ = value; + } else { + apiBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setApi(com.google.cloud.apihub.v1.Api.Builder builderForValue) { + if (apiBuilder_ == null) { + api_ = builderForValue.build(); + } else { + apiBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeApi(com.google.cloud.apihub.v1.Api value) { + if (apiBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && api_ != null + && api_ != com.google.cloud.apihub.v1.Api.getDefaultInstance()) { + getApiBuilder().mergeFrom(value); + } else { + api_ = value; + } + } else { + apiBuilder_.mergeFrom(value); + } + if (api_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearApi() { + bitField0_ = (bitField0_ & ~0x00000001); + api_ = null; + if (apiBuilder_ != null) { + apiBuilder_.dispose(); + apiBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apihub.v1.Api.Builder getApiBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getApiFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.apihub.v1.ApiOrBuilder getApiOrBuilder() { + if (apiBuilder_ != null) { + return apiBuilder_.getMessageOrBuilder(); + } else { + return api_ == null ? com.google.cloud.apihub.v1.Api.getDefaultInstance() : api_; + } + } + + /** + * + * + *
    +     * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +     * the API resource will be generated by Hub to ensure uniqueness across all
    +     * APIs across systems.
    +     * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Api, + com.google.cloud.apihub.v1.Api.Builder, + com.google.cloud.apihub.v1.ApiOrBuilder> + getApiFieldBuilder() { + if (apiBuilder_ == null) { + apiBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Api, + com.google.cloud.apihub.v1.Api.Builder, + com.google.cloud.apihub.v1.ApiOrBuilder>( + getApi(), getParentForChildren(), isClean()); + api_ = null; + } + return apiBuilder_; + } + + private java.util.List versions_ = + java.util.Collections.emptyList(); + + private void ensureVersionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + versions_ = new java.util.ArrayList(versions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.VersionMetadata, + com.google.cloud.apihub.v1.VersionMetadata.Builder, + com.google.cloud.apihub.v1.VersionMetadataOrBuilder> + versionsBuilder_; + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getVersionsList() { + if (versionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versions_); + } else { + return versionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getVersionsCount() { + if (versionsBuilder_ == null) { + return versions_.size(); + } else { + return versionsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.VersionMetadata getVersions(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVersions(int index, com.google.cloud.apihub.v1.VersionMetadata value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.set(index, value); + onChanged(); + } else { + versionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVersions( + int index, com.google.cloud.apihub.v1.VersionMetadata.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.set(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVersions(com.google.cloud.apihub.v1.VersionMetadata value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(value); + onChanged(); + } else { + versionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVersions(int index, com.google.cloud.apihub.v1.VersionMetadata value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(index, value); + onChanged(); + } else { + versionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVersions(com.google.cloud.apihub.v1.VersionMetadata.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVersions( + int index, com.google.cloud.apihub.v1.VersionMetadata.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllVersions( + java.lang.Iterable values) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versions_); + onChanged(); + } else { + versionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + versionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeVersions(int index) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.remove(index); + onChanged(); + } else { + versionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.VersionMetadata.Builder getVersionsBuilder(int index) { + return getVersionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.VersionMetadataOrBuilder getVersionsOrBuilder(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getVersionsOrBuilderList() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versions_); + } + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.VersionMetadata.Builder addVersionsBuilder() { + return getVersionsFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.VersionMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.VersionMetadata.Builder addVersionsBuilder(int index) { + return getVersionsFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.VersionMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. The list of versions present in an API resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getVersionsBuilderList() { + return getVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.VersionMetadata, + com.google.cloud.apihub.v1.VersionMetadata.Builder, + com.google.cloud.apihub.v1.VersionMetadataOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.VersionMetadata, + com.google.cloud.apihub.v1.VersionMetadata.Builder, + com.google.cloud.apihub.v1.VersionMetadataOrBuilder>( + versions_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + versions_ = null; + } + return versionsBuilder_; + } + + private java.lang.Object originalId_ = ""; + + /** + * + * + *
    +     * Optional. The unique identifier of the API in the system where it was
    +     * originally created.
    +     * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + public java.lang.String getOriginalId() { + java.lang.Object ref = originalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique identifier of the API in the system where it was
    +     * originally created.
    +     * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + public com.google.protobuf.ByteString getOriginalIdBytes() { + java.lang.Object ref = originalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique identifier of the API in the system where it was
    +     * originally created.
    +     * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The originalId to set. + * @return This builder for chaining. + */ + public Builder setOriginalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + originalId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique identifier of the API in the system where it was
    +     * originally created.
    +     * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOriginalId() { + originalId_ = getDefaultInstance().getOriginalId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique identifier of the API in the system where it was
    +     * originally created.
    +     * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for originalId to set. + * @return This builder for chaining. + */ + public Builder setOriginalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + originalId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp originalCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + originalCreateTimeBuilder_; + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + public boolean hasOriginalCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + public com.google.protobuf.Timestamp getOriginalCreateTime() { + if (originalCreateTimeBuilder_ == null) { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } else { + return originalCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOriginalCreateTime(com.google.protobuf.Timestamp value) { + if (originalCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalCreateTime_ = value; + } else { + originalCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOriginalCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (originalCreateTimeBuilder_ == null) { + originalCreateTime_ = builderForValue.build(); + } else { + originalCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOriginalCreateTime(com.google.protobuf.Timestamp value) { + if (originalCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && originalCreateTime_ != null + && originalCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOriginalCreateTimeBuilder().mergeFrom(value); + } else { + originalCreateTime_ = value; + } + } else { + originalCreateTimeBuilder_.mergeFrom(value); + } + if (originalCreateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOriginalCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + originalCreateTime_ = null; + if (originalCreateTimeBuilder_ != null) { + originalCreateTimeBuilder_.dispose(); + originalCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getOriginalCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOriginalCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder() { + if (originalCreateTimeBuilder_ != null) { + return originalCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the API was created at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOriginalCreateTimeFieldBuilder() { + if (originalCreateTimeBuilder_ == null) { + originalCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOriginalCreateTime(), getParentForChildren(), isClean()); + originalCreateTime_ = null; + } + return originalCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp originalUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + originalUpdateTimeBuilder_; + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + public boolean hasOriginalUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + public com.google.protobuf.Timestamp getOriginalUpdateTime() { + if (originalUpdateTimeBuilder_ == null) { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } else { + return originalUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOriginalUpdateTime(com.google.protobuf.Timestamp value) { + if (originalUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalUpdateTime_ = value; + } else { + originalUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOriginalUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (originalUpdateTimeBuilder_ == null) { + originalUpdateTime_ = builderForValue.build(); + } else { + originalUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOriginalUpdateTime(com.google.protobuf.Timestamp value) { + if (originalUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && originalUpdateTime_ != null + && originalUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOriginalUpdateTimeBuilder().mergeFrom(value); + } else { + originalUpdateTime_ = value; + } + } else { + originalUpdateTimeBuilder_.mergeFrom(value); + } + if (originalUpdateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOriginalUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + originalUpdateTime_ = null; + if (originalUpdateTimeBuilder_ != null) { + originalUpdateTimeBuilder_.dispose(); + originalUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getOriginalUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOriginalUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder() { + if (originalUpdateTimeBuilder_ != null) { + return originalUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the API was last updated at the source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOriginalUpdateTimeFieldBuilder() { + if (originalUpdateTimeBuilder_ == null) { + originalUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOriginalUpdateTime(), getParentForChildren(), isClean()); + originalUpdateTime_ = null; + } + return originalUpdateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.APIMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.APIMetadata) + private static final com.google.cloud.apihub.v1.APIMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.APIMetadata(); + } + + public static com.google.cloud.apihub.v1.APIMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public APIMetadata 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.apihub.v1.APIMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadataOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadataOrBuilder.java new file mode 100644 index 000000000000..d9340cee7216 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/APIMetadataOrBuilder.java @@ -0,0 +1,249 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface APIMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.APIMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the api field is set. + */ + boolean hasApi(); + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The api. + */ + com.google.cloud.apihub.v1.Api getApi(); + + /** + * + * + *
    +   * Required. The API resource to be pushed to Hub's collect layer. The ID of
    +   * the API resource will be generated by Hub to ensure uniqueness across all
    +   * APIs across systems.
    +   * 
    + * + * .google.cloud.apihub.v1.Api api = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.apihub.v1.ApiOrBuilder getApiOrBuilder(); + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getVersionsList(); + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.VersionMetadata getVersions(int index); + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getVersionsCount(); + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getVersionsOrBuilderList(); + + /** + * + * + *
    +   * Optional. The list of versions present in an API resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.VersionMetadata versions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.VersionMetadataOrBuilder getVersionsOrBuilder(int index); + + /** + * + * + *
    +   * Optional. The unique identifier of the API in the system where it was
    +   * originally created.
    +   * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + java.lang.String getOriginalId(); + + /** + * + * + *
    +   * Optional. The unique identifier of the API in the system where it was
    +   * originally created.
    +   * 
    + * + * string original_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + com.google.protobuf.ByteString getOriginalIdBytes(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + boolean hasOriginalCreateTime(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + com.google.protobuf.Timestamp getOriginalCreateTime(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the API was created at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + boolean hasOriginalUpdateTime(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + com.google.protobuf.Timestamp getOriginalUpdateTime(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the API was last updated at the source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetail.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetail.java new file mode 100644 index 000000000000..4ada0d7db186 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetail.java @@ -0,0 +1,634 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The details for the action to execute.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ActionExecutionDetail} + */ +public final class ActionExecutionDetail extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ActionExecutionDetail) + ActionExecutionDetailOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ActionExecutionDetail.newBuilder() to construct. + private ActionExecutionDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActionExecutionDetail() { + actionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActionExecutionDetail(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_ActionExecutionDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_ActionExecutionDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ActionExecutionDetail.class, + com.google.cloud.apihub.v1.ActionExecutionDetail.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object actionId_ = ""; + + /** + * + * + *
    +   * Required. The action id of the plugin to execute.
    +   * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + @java.lang.Override + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The action id of the plugin to execute.
    +   * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = 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(actionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actionId_); + } + 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(actionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actionId_); + } + 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.apihub.v1.ActionExecutionDetail)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ActionExecutionDetail other = + (com.google.cloud.apihub.v1.ActionExecutionDetail) obj; + + if (!getActionId().equals(other.getActionId())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail 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.apihub.v1.ActionExecutionDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom( + 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.apihub.v1.ActionExecutionDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom( + java.io.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.apihub.v1.ActionExecutionDetail parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseDelimitedFrom( + java.io.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.apihub.v1.ActionExecutionDetail parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ActionExecutionDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The details for the action to execute.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ActionExecutionDetail} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ActionExecutionDetail) + com.google.cloud.apihub.v1.ActionExecutionDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_ActionExecutionDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_ActionExecutionDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ActionExecutionDetail.class, + com.google.cloud.apihub.v1.ActionExecutionDetail.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ActionExecutionDetail.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + actionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_ActionExecutionDetail_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ActionExecutionDetail getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ActionExecutionDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ActionExecutionDetail build() { + com.google.cloud.apihub.v1.ActionExecutionDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ActionExecutionDetail buildPartial() { + com.google.cloud.apihub.v1.ActionExecutionDetail result = + new com.google.cloud.apihub.v1.ActionExecutionDetail(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.ActionExecutionDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.actionId_ = actionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ActionExecutionDetail) { + return mergeFrom((com.google.cloud.apihub.v1.ActionExecutionDetail) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ActionExecutionDetail other) { + if (other == com.google.cloud.apihub.v1.ActionExecutionDetail.getDefaultInstance()) + return this; + if (!other.getActionId().isEmpty()) { + actionId_ = other.actionId_; + bitField0_ |= 0x00000001; + 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: + { + actionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object actionId_ = ""; + + /** + * + * + *
    +     * Required. The action id of the plugin to execute.
    +     * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The action id of the plugin to execute.
    +     * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The action id of the plugin to execute.
    +     * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action id of the plugin to execute.
    +     * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + actionId_ = getDefaultInstance().getActionId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action id of the plugin to execute.
    +     * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for actionId to set. + * @return This builder for chaining. + */ + public Builder setActionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.ActionExecutionDetail) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ActionExecutionDetail) + private static final com.google.cloud.apihub.v1.ActionExecutionDetail DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ActionExecutionDetail(); + } + + public static com.google.cloud.apihub.v1.ActionExecutionDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActionExecutionDetail 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.apihub.v1.ActionExecutionDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetailOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetailOrBuilder.java new file mode 100644 index 000000000000..6ce5807bf86d --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionExecutionDetailOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ActionExecutionDetailOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ActionExecutionDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The action id of the plugin to execute.
    +   * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + java.lang.String getActionId(); + + /** + * + * + *
    +   * Required. The action id of the plugin to execute.
    +   * 
    + * + * string action_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + com.google.protobuf.ByteString getActionIdBytes(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionType.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionType.java new file mode 100644 index 000000000000..3c9b2309d38f --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ActionType.java @@ -0,0 +1,179 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * Enum for the action type.
    + * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.ActionType} + */ +public enum ActionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * Default unspecified action type.
    +   * 
    + * + * ACTION_TYPE_UNSPECIFIED = 0; + */ + ACTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +   * Action type for sync metadata.
    +   * 
    + * + * SYNC_METADATA = 1; + */ + SYNC_METADATA(1), + /** + * + * + *
    +   * Action type for sync runtime data.
    +   * 
    + * + * SYNC_RUNTIME_DATA = 2; + */ + SYNC_RUNTIME_DATA(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * Default unspecified action type.
    +   * 
    + * + * ACTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ACTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +   * Action type for sync metadata.
    +   * 
    + * + * SYNC_METADATA = 1; + */ + public static final int SYNC_METADATA_VALUE = 1; + + /** + * + * + *
    +   * Action type for sync runtime data.
    +   * 
    + * + * SYNC_RUNTIME_DATA = 2; + */ + public static final int SYNC_RUNTIME_DATA_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionType 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 ActionType forNumber(int value) { + switch (value) { + case 0: + return ACTION_TYPE_UNSPECIFIED; + case 1: + return SYNC_METADATA; + case 2: + return SYNC_RUNTIME_DATA; + 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 ActionType findValueByNumber(int number) { + return ActionType.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.apihub.v1.PluginServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ActionType[] VALUES = values(); + + public static ActionType 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 ActionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.ActionType) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Api.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Api.java index da3327a0608e..29a811b69b57 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Api.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Api.java @@ -45,6 +45,8 @@ private Api() { description_ = ""; versions_ = com.google.protobuf.LazyStringArrayList.emptyList(); selectedVersion_ = ""; + fingerprint_ = ""; + sourceMetadata_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -1140,6 +1142,383 @@ public com.google.protobuf.ByteString getSelectedVersionBytes() { } } + public static final int API_REQUIREMENTS_FIELD_NUMBER = 16; + private com.google.cloud.apihub.v1.AttributeValues apiRequirements_; + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiRequirements field is set. + */ + @java.lang.Override + public boolean hasApiRequirements() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiRequirements. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues getApiRequirements() { + return apiRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiRequirements_; + } + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getApiRequirementsOrBuilder() { + return apiRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiRequirements_; + } + + public static final int FINGERPRINT_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object fingerprint_ = ""; + + /** + * + * + *
    +   * Optional. Fingerprint of the API resource.
    +   * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fingerprint. + */ + @java.lang.Override + public java.lang.String getFingerprint() { + java.lang.Object ref = fingerprint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fingerprint_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. Fingerprint of the API resource.
    +   * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fingerprint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFingerprintBytes() { + java.lang.Object ref = fingerprint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fingerprint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_METADATA_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private java.util.List sourceMetadata_; + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSourceMetadataList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSourceMetadataOrBuilderList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSourceMetadataCount() { + return sourceMetadata_.size(); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + return sourceMetadata_.get(index); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index) { + return sourceMetadata_.get(index); + } + + public static final int API_FUNCTIONAL_REQUIREMENTS_FIELD_NUMBER = 19; + private com.google.cloud.apihub.v1.AttributeValues apiFunctionalRequirements_; + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiFunctionalRequirements field is set. + */ + @java.lang.Override + public boolean hasApiFunctionalRequirements() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiFunctionalRequirements. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues getApiFunctionalRequirements() { + return apiFunctionalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiFunctionalRequirements_; + } + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder + getApiFunctionalRequirementsOrBuilder() { + return apiFunctionalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiFunctionalRequirements_; + } + + public static final int API_TECHNICAL_REQUIREMENTS_FIELD_NUMBER = 20; + private com.google.cloud.apihub.v1.AttributeValues apiTechnicalRequirements_; + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiTechnicalRequirements field is set. + */ + @java.lang.Override + public boolean hasApiTechnicalRequirements() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiTechnicalRequirements. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues getApiTechnicalRequirements() { + return apiTechnicalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiTechnicalRequirements_; + } + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder + getApiTechnicalRequirementsOrBuilder() { + return apiTechnicalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiTechnicalRequirements_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1198,6 +1577,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, selectedVersion_); } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(16, getApiRequirements()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fingerprint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, fingerprint_); + } + for (int i = 0; i < sourceMetadata_.size(); i++) { + output.writeMessage(18, sourceMetadata_.get(i)); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(19, getApiFunctionalRequirements()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(20, getApiTechnicalRequirements()); + } getUnknownFields().writeTo(output); } @@ -1265,6 +1659,25 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, selectedVersion_); } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getApiRequirements()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fingerprint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, fingerprint_); + } + for (int i = 0; i < sourceMetadata_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, sourceMetadata_.get(i)); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getApiFunctionalRequirements()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, getApiTechnicalRequirements()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1322,6 +1735,21 @@ public boolean equals(final java.lang.Object obj) { if (!getApiStyle().equals(other.getApiStyle())) return false; } if (!getSelectedVersion().equals(other.getSelectedVersion())) return false; + if (hasApiRequirements() != other.hasApiRequirements()) return false; + if (hasApiRequirements()) { + if (!getApiRequirements().equals(other.getApiRequirements())) return false; + } + if (!getFingerprint().equals(other.getFingerprint())) return false; + if (!getSourceMetadataList().equals(other.getSourceMetadataList())) return false; + if (hasApiFunctionalRequirements() != other.hasApiFunctionalRequirements()) return false; + if (hasApiFunctionalRequirements()) { + if (!getApiFunctionalRequirements().equals(other.getApiFunctionalRequirements())) + return false; + } + if (hasApiTechnicalRequirements() != other.hasApiTechnicalRequirements()) return false; + if (hasApiTechnicalRequirements()) { + if (!getApiTechnicalRequirements().equals(other.getApiTechnicalRequirements())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1385,6 +1813,24 @@ public int hashCode() { } hash = (37 * hash) + SELECTED_VERSION_FIELD_NUMBER; hash = (53 * hash) + getSelectedVersion().hashCode(); + if (hasApiRequirements()) { + hash = (37 * hash) + API_REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getApiRequirements().hashCode(); + } + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + if (getSourceMetadataCount() > 0) { + hash = (37 * hash) + SOURCE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getSourceMetadataList().hashCode(); + } + if (hasApiFunctionalRequirements()) { + hash = (37 * hash) + API_FUNCTIONAL_REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getApiFunctionalRequirements().hashCode(); + } + if (hasApiTechnicalRequirements()) { + hash = (37 * hash) + API_TECHNICAL_REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getApiTechnicalRequirements().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1555,6 +2001,10 @@ private void maybeForceBuilderInitialization() { getBusinessUnitFieldBuilder(); getMaturityLevelFieldBuilder(); getApiStyleFieldBuilder(); + getApiRequirementsFieldBuilder(); + getSourceMetadataFieldBuilder(); + getApiFunctionalRequirementsFieldBuilder(); + getApiTechnicalRequirementsFieldBuilder(); } } @@ -1613,6 +2063,29 @@ public Builder clear() { apiStyleBuilder_ = null; } selectedVersion_ = ""; + apiRequirements_ = null; + if (apiRequirementsBuilder_ != null) { + apiRequirementsBuilder_.dispose(); + apiRequirementsBuilder_ = null; + } + fingerprint_ = ""; + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + } else { + sourceMetadata_ = null; + sourceMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + apiFunctionalRequirements_ = null; + if (apiFunctionalRequirementsBuilder_ != null) { + apiFunctionalRequirementsBuilder_.dispose(); + apiFunctionalRequirementsBuilder_ = null; + } + apiTechnicalRequirements_ = null; + if (apiTechnicalRequirementsBuilder_ != null) { + apiTechnicalRequirementsBuilder_.dispose(); + apiTechnicalRequirementsBuilder_ = null; + } return this; } @@ -1639,6 +2112,7 @@ public com.google.cloud.apihub.v1.Api build() { @java.lang.Override public com.google.cloud.apihub.v1.Api buildPartial() { com.google.cloud.apihub.v1.Api result = new com.google.cloud.apihub.v1.Api(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1646,6 +2120,18 @@ public com.google.cloud.apihub.v1.Api buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.Api result) { + if (sourceMetadataBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + sourceMetadata_ = java.util.Collections.unmodifiableList(sourceMetadata_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.sourceMetadata_ = sourceMetadata_; + } else { + result.sourceMetadata_ = sourceMetadataBuilder_.build(); + } + } + private void buildPartial0(com.google.cloud.apihub.v1.Api result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -1708,8 +2194,30 @@ private void buildPartial0(com.google.cloud.apihub.v1.Api result) { if (((from_bitField0_ & 0x00004000) != 0)) { result.selectedVersion_ = selectedVersion_; } - result.bitField0_ |= to_bitField0_; - } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.apiRequirements_ = + apiRequirementsBuilder_ == null ? apiRequirements_ : apiRequirementsBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.fingerprint_ = fingerprint_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.apiFunctionalRequirements_ = + apiFunctionalRequirementsBuilder_ == null + ? apiFunctionalRequirements_ + : apiFunctionalRequirementsBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.apiTechnicalRequirements_ = + apiTechnicalRequirementsBuilder_ == null + ? apiTechnicalRequirements_ + : apiTechnicalRequirementsBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + result.bitField0_ |= to_bitField0_; + } @java.lang.Override public Builder clone() { @@ -1815,6 +2323,47 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.Api other) { bitField0_ |= 0x00004000; onChanged(); } + if (other.hasApiRequirements()) { + mergeApiRequirements(other.getApiRequirements()); + } + if (!other.getFingerprint().isEmpty()) { + fingerprint_ = other.fingerprint_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (sourceMetadataBuilder_ == null) { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadata_.isEmpty()) { + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureSourceMetadataIsMutable(); + sourceMetadata_.addAll(other.sourceMetadata_); + } + onChanged(); + } + } else { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadataBuilder_.isEmpty()) { + sourceMetadataBuilder_.dispose(); + sourceMetadataBuilder_ = null; + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00020000); + sourceMetadataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourceMetadataFieldBuilder() + : null; + } else { + sourceMetadataBuilder_.addAllMessages(other.sourceMetadata_); + } + } + } + if (other.hasApiFunctionalRequirements()) { + mergeApiFunctionalRequirements(other.getApiFunctionalRequirements()); + } + if (other.hasApiTechnicalRequirements()) { + mergeApiTechnicalRequirements(other.getApiTechnicalRequirements()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1940,6 +2489,45 @@ public Builder mergeFrom( bitField0_ |= 0x00004000; break; } // case 122 + case 130: + { + input.readMessage(getApiRequirementsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: + { + com.google.cloud.apihub.v1.SourceMetadata m = + input.readMessage( + com.google.cloud.apihub.v1.SourceMetadata.parser(), extensionRegistry); + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(m); + } else { + sourceMetadataBuilder_.addMessage(m); + } + break; + } // case 146 + case 154: + { + input.readMessage( + getApiFunctionalRequirementsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 162: + { + input.readMessage( + getApiTechnicalRequirementsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 162 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5171,6 +5759,1351 @@ public Builder setSelectedVersionBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.apihub.v1.AttributeValues apiRequirements_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + apiRequirementsBuilder_; + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiRequirements field is set. + */ + public boolean hasApiRequirements() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiRequirements. + */ + public com.google.cloud.apihub.v1.AttributeValues getApiRequirements() { + if (apiRequirementsBuilder_ == null) { + return apiRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiRequirements_; + } else { + return apiRequirementsBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiRequirements(com.google.cloud.apihub.v1.AttributeValues value) { + if (apiRequirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiRequirements_ = value; + } else { + apiRequirementsBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiRequirements( + com.google.cloud.apihub.v1.AttributeValues.Builder builderForValue) { + if (apiRequirementsBuilder_ == null) { + apiRequirements_ = builderForValue.build(); + } else { + apiRequirementsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiRequirements(com.google.cloud.apihub.v1.AttributeValues value) { + if (apiRequirementsBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && apiRequirements_ != null + && apiRequirements_ + != com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) { + getApiRequirementsBuilder().mergeFrom(value); + } else { + apiRequirements_ = value; + } + } else { + apiRequirementsBuilder_.mergeFrom(value); + } + if (apiRequirements_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiRequirements() { + bitField0_ = (bitField0_ & ~0x00008000); + apiRequirements_ = null; + if (apiRequirementsBuilder_ != null) { + apiRequirementsBuilder_.dispose(); + apiRequirementsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValues.Builder getApiRequirementsBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getApiRequirementsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getApiRequirementsOrBuilder() { + if (apiRequirementsBuilder_ != null) { + return apiRequirementsBuilder_.getMessageOrBuilder(); + } else { + return apiRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiRequirements_; + } + } + + /** + * + * + *
    +     * Optional. The api requirement doc associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + getApiRequirementsFieldBuilder() { + if (apiRequirementsBuilder_ == null) { + apiRequirementsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder>( + getApiRequirements(), getParentForChildren(), isClean()); + apiRequirements_ = null; + } + return apiRequirementsBuilder_; + } + + private java.lang.Object fingerprint_ = ""; + + /** + * + * + *
    +     * Optional. Fingerprint of the API resource.
    +     * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fingerprint. + */ + public java.lang.String getFingerprint() { + java.lang.Object ref = fingerprint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fingerprint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. Fingerprint of the API resource.
    +     * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fingerprint. + */ + public com.google.protobuf.ByteString getFingerprintBytes() { + java.lang.Object ref = fingerprint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fingerprint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. Fingerprint of the API resource.
    +     * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fingerprint to set. + * @return This builder for chaining. + */ + public Builder setFingerprint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Fingerprint of the API resource.
    +     * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFingerprint() { + fingerprint_ = getDefaultInstance().getFingerprint(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Fingerprint of the API resource.
    +     * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for fingerprint to set. + * @return This builder for chaining. + */ + public Builder setFingerprintBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fingerprint_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private java.util.List sourceMetadata_ = + java.util.Collections.emptyList(); + + private void ensureSourceMetadataIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + sourceMetadata_ = + new java.util.ArrayList(sourceMetadata_); + bitField0_ |= 0x00020000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + sourceMetadataBuilder_; + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSourceMetadataList() { + if (sourceMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } else { + return sourceMetadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSourceMetadataCount() { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.size(); + } else { + return sourceMetadataBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSourceMetadata( + java.lang.Iterable values) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceMetadata_); + onChanged(); + } else { + sourceMetadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSourceMetadata() { + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + sourceMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.remove(index); + onChanged(); + } else { + sourceMetadataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder getSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder( + int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataOrBuilderList() { + if (sourceMetadataBuilder_ != null) { + return sourceMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder() { + return getSourceMetadataFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * resource.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataBuilderList() { + return getSourceMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + getSourceMetadataFieldBuilder() { + if (sourceMetadataBuilder_ == null) { + sourceMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder>( + sourceMetadata_, + ((bitField0_ & 0x00020000) != 0), + getParentForChildren(), + isClean()); + sourceMetadata_ = null; + } + return sourceMetadataBuilder_; + } + + private com.google.cloud.apihub.v1.AttributeValues apiFunctionalRequirements_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + apiFunctionalRequirementsBuilder_; + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiFunctionalRequirements field is set. + */ + public boolean hasApiFunctionalRequirements() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiFunctionalRequirements. + */ + public com.google.cloud.apihub.v1.AttributeValues getApiFunctionalRequirements() { + if (apiFunctionalRequirementsBuilder_ == null) { + return apiFunctionalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiFunctionalRequirements_; + } else { + return apiFunctionalRequirementsBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiFunctionalRequirements(com.google.cloud.apihub.v1.AttributeValues value) { + if (apiFunctionalRequirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiFunctionalRequirements_ = value; + } else { + apiFunctionalRequirementsBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiFunctionalRequirements( + com.google.cloud.apihub.v1.AttributeValues.Builder builderForValue) { + if (apiFunctionalRequirementsBuilder_ == null) { + apiFunctionalRequirements_ = builderForValue.build(); + } else { + apiFunctionalRequirementsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiFunctionalRequirements( + com.google.cloud.apihub.v1.AttributeValues value) { + if (apiFunctionalRequirementsBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && apiFunctionalRequirements_ != null + && apiFunctionalRequirements_ + != com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) { + getApiFunctionalRequirementsBuilder().mergeFrom(value); + } else { + apiFunctionalRequirements_ = value; + } + } else { + apiFunctionalRequirementsBuilder_.mergeFrom(value); + } + if (apiFunctionalRequirements_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiFunctionalRequirements() { + bitField0_ = (bitField0_ & ~0x00040000); + apiFunctionalRequirements_ = null; + if (apiFunctionalRequirementsBuilder_ != null) { + apiFunctionalRequirementsBuilder_.dispose(); + apiFunctionalRequirementsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValues.Builder + getApiFunctionalRequirementsBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getApiFunctionalRequirementsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder + getApiFunctionalRequirementsOrBuilder() { + if (apiFunctionalRequirementsBuilder_ != null) { + return apiFunctionalRequirementsBuilder_.getMessageOrBuilder(); + } else { + return apiFunctionalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiFunctionalRequirements_; + } + } + + /** + * + * + *
    +     * Optional. The api functional requirements associated with the API resource.
    +     * Carinality is 1 for this attribute.
    +     * This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + getApiFunctionalRequirementsFieldBuilder() { + if (apiFunctionalRequirementsBuilder_ == null) { + apiFunctionalRequirementsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder>( + getApiFunctionalRequirements(), getParentForChildren(), isClean()); + apiFunctionalRequirements_ = null; + } + return apiFunctionalRequirementsBuilder_; + } + + private com.google.cloud.apihub.v1.AttributeValues apiTechnicalRequirements_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + apiTechnicalRequirementsBuilder_; + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiTechnicalRequirements field is set. + */ + public boolean hasApiTechnicalRequirements() { + return ((bitField0_ & 0x00080000) != 0); + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiTechnicalRequirements. + */ + public com.google.cloud.apihub.v1.AttributeValues getApiTechnicalRequirements() { + if (apiTechnicalRequirementsBuilder_ == null) { + return apiTechnicalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiTechnicalRequirements_; + } else { + return apiTechnicalRequirementsBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiTechnicalRequirements(com.google.cloud.apihub.v1.AttributeValues value) { + if (apiTechnicalRequirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiTechnicalRequirements_ = value; + } else { + apiTechnicalRequirementsBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiTechnicalRequirements( + com.google.cloud.apihub.v1.AttributeValues.Builder builderForValue) { + if (apiTechnicalRequirementsBuilder_ == null) { + apiTechnicalRequirements_ = builderForValue.build(); + } else { + apiTechnicalRequirementsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiTechnicalRequirements(com.google.cloud.apihub.v1.AttributeValues value) { + if (apiTechnicalRequirementsBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && apiTechnicalRequirements_ != null + && apiTechnicalRequirements_ + != com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) { + getApiTechnicalRequirementsBuilder().mergeFrom(value); + } else { + apiTechnicalRequirements_ = value; + } + } else { + apiTechnicalRequirementsBuilder_.mergeFrom(value); + } + if (apiTechnicalRequirements_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiTechnicalRequirements() { + bitField0_ = (bitField0_ & ~0x00080000); + apiTechnicalRequirements_ = null; + if (apiTechnicalRequirementsBuilder_ != null) { + apiTechnicalRequirementsBuilder_.dispose(); + apiTechnicalRequirementsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValues.Builder getApiTechnicalRequirementsBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getApiTechnicalRequirementsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder + getApiTechnicalRequirementsOrBuilder() { + if (apiTechnicalRequirementsBuilder_ != null) { + return apiTechnicalRequirementsBuilder_.getMessageOrBuilder(); + } else { + return apiTechnicalRequirements_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : apiTechnicalRequirements_; + } + } + + /** + * + * + *
    +     * Optional. The api technical requirements associated with the API resource.
    +     * Carinality is 1 for this attribute. This maps to the following system
    +     * defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +     * attribute. The value of the attribute should be a proper URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + getApiTechnicalRequirementsFieldBuilder() { + if (apiTechnicalRequirementsBuilder_ == null) { + apiTechnicalRequirementsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder>( + getApiTechnicalRequirements(), getParentForChildren(), isClean()); + apiTechnicalRequirements_ = null; + } + return apiTechnicalRequirementsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiData.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiData.java new file mode 100644 index 000000000000..ff22c008208d --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiData.java @@ -0,0 +1,852 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The API data to be collected.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApiData} + */ +public final class ApiData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ApiData) + ApiDataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ApiData.newBuilder() to construct. + private ApiData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApiData.class, + com.google.cloud.apihub.v1.ApiData.Builder.class); + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_METADATA_LIST(1), + DATA_NOT_SET(0); + private final int value; + + private DataCase(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 DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 1: + return API_METADATA_LIST; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int API_METADATA_LIST_FIELD_NUMBER = 1; + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiMetadataList field is set. + */ + @java.lang.Override + public boolean hasApiMetadataList() { + return dataCase_ == 1; + } + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiMetadataList. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataList getApiMetadataList() { + if (dataCase_ == 1) { + return (com.google.cloud.apihub.v1.ApiMetadataList) data_; + } + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataListOrBuilder getApiMetadataListOrBuilder() { + if (dataCase_ == 1) { + return (com.google.cloud.apihub.v1.ApiMetadataList) data_; + } + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataCase_ == 1) { + output.writeMessage(1, (com.google.cloud.apihub.v1.ApiMetadataList) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.apihub.v1.ApiMetadataList) data_); + } + 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.apihub.v1.ApiData)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ApiData other = (com.google.cloud.apihub.v1.ApiData) obj; + + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 1: + if (!getApiMetadataList().equals(other.getApiMetadataList())) 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(); + switch (dataCase_) { + case 1: + hash = (37 * hash) + API_METADATA_LIST_FIELD_NUMBER; + hash = (53 * hash) + getApiMetadataList().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiData 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.apihub.v1.ApiData parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom( + 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.apihub.v1.ApiData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom( + java.io.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.apihub.v1.ApiData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiData parseDelimitedFrom( + java.io.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.apihub.v1.ApiData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ApiData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The API data to be collected.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApiData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ApiData) + com.google.cloud.apihub.v1.ApiDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApiData.class, + com.google.cloud.apihub.v1.ApiData.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ApiData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (apiMetadataListBuilder_ != null) { + apiMetadataListBuilder_.clear(); + } + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiData_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiData getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ApiData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiData build() { + com.google.cloud.apihub.v1.ApiData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiData buildPartial() { + com.google.cloud.apihub.v1.ApiData result = new com.google.cloud.apihub.v1.ApiData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.ApiData result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.apihub.v1.ApiData result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 1 && apiMetadataListBuilder_ != null) { + result.data_ = apiMetadataListBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ApiData) { + return mergeFrom((com.google.cloud.apihub.v1.ApiData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ApiData other) { + if (other == com.google.cloud.apihub.v1.ApiData.getDefaultInstance()) return this; + switch (other.getDataCase()) { + case API_METADATA_LIST: + { + mergeApiMetadataList(other.getApiMetadataList()); + break; + } + case DATA_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: + { + input.readMessage(getApiMetadataListFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 1; + 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 int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiMetadataList, + com.google.cloud.apihub.v1.ApiMetadataList.Builder, + com.google.cloud.apihub.v1.ApiMetadataListOrBuilder> + apiMetadataListBuilder_; + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiMetadataList field is set. + */ + @java.lang.Override + public boolean hasApiMetadataList() { + return dataCase_ == 1; + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiMetadataList. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataList getApiMetadataList() { + if (apiMetadataListBuilder_ == null) { + if (dataCase_ == 1) { + return (com.google.cloud.apihub.v1.ApiMetadataList) data_; + } + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } else { + if (dataCase_ == 1) { + return apiMetadataListBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiMetadataList(com.google.cloud.apihub.v1.ApiMetadataList value) { + if (apiMetadataListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + apiMetadataListBuilder_.setMessage(value); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiMetadataList( + com.google.cloud.apihub.v1.ApiMetadataList.Builder builderForValue) { + if (apiMetadataListBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + apiMetadataListBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiMetadataList(com.google.cloud.apihub.v1.ApiMetadataList value) { + if (apiMetadataListBuilder_ == null) { + if (dataCase_ == 1 + && data_ != com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance()) { + data_ = + com.google.cloud.apihub.v1.ApiMetadataList.newBuilder( + (com.google.cloud.apihub.v1.ApiMetadataList) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 1) { + apiMetadataListBuilder_.mergeFrom(value); + } else { + apiMetadataListBuilder_.setMessage(value); + } + } + dataCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiMetadataList() { + if (apiMetadataListBuilder_ == null) { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 1) { + dataCase_ = 0; + data_ = null; + } + apiMetadataListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ApiMetadataList.Builder getApiMetadataListBuilder() { + return getApiMetadataListFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataListOrBuilder getApiMetadataListOrBuilder() { + if ((dataCase_ == 1) && (apiMetadataListBuilder_ != null)) { + return apiMetadataListBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 1) { + return (com.google.cloud.apihub.v1.ApiMetadataList) data_; + } + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The list of API metadata.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiMetadataList, + com.google.cloud.apihub.v1.ApiMetadataList.Builder, + com.google.cloud.apihub.v1.ApiMetadataListOrBuilder> + getApiMetadataListFieldBuilder() { + if (apiMetadataListBuilder_ == null) { + if (!(dataCase_ == 1)) { + data_ = com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + apiMetadataListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiMetadataList, + com.google.cloud.apihub.v1.ApiMetadataList.Builder, + com.google.cloud.apihub.v1.ApiMetadataListOrBuilder>( + (com.google.cloud.apihub.v1.ApiMetadataList) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 1; + onChanged(); + return apiMetadataListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.ApiData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ApiData) + private static final com.google.cloud.apihub.v1.ApiData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ApiData(); + } + + public static com.google.cloud.apihub.v1.ApiData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiData 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.apihub.v1.ApiData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiDataOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiDataOrBuilder.java new file mode 100644 index 000000000000..2bb3ebd552a6 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiDataOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ApiDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ApiData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiMetadataList field is set. + */ + boolean hasApiMetadataList(); + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiMetadataList. + */ + com.google.cloud.apihub.v1.ApiMetadataList getApiMetadataList(); + + /** + * + * + *
    +   * Optional. The list of API metadata.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiMetadataList api_metadata_list = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ApiMetadataListOrBuilder getApiMetadataListOrBuilder(); + + com.google.cloud.apihub.v1.ApiData.DataCase getDataCase(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubInstance.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubInstance.java index 04fbe936489e..f57c972b793b 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubInstance.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubInstance.java @@ -340,13 +340,14 @@ public interface ConfigOrBuilder * * *
    -     * Required. The Customer Managed Encryption Key (CMEK) used for data
    +     * Optional. The Customer Managed Encryption Key (CMEK) used for data
          * encryption. The CMEK name should follow the format of
          * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
          * where the location must match the instance location.
    +     * If the CMEK is not provided, a GMEK will be created for the instance.
          * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cmekKeyName. */ @@ -356,17 +357,94 @@ public interface ConfigOrBuilder * * *
    -     * Required. The Customer Managed Encryption Key (CMEK) used for data
    +     * Optional. The Customer Managed Encryption Key (CMEK) used for data
          * encryption. The CMEK name should follow the format of
          * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
          * where the location must match the instance location.
    +     * If the CMEK is not provided, a GMEK will be created for the instance.
          * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cmekKeyName. */ com.google.protobuf.ByteString getCmekKeyNameBytes(); + + /** + * + * + *
    +     * Optional. If true, the search will be disabled for the instance. The
    +     * default value is false.
    +     * 
    + * + * bool disable_search = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSearch. + */ + boolean getDisableSearch(); + + /** + * + * + *
    +     * Optional. The name of the Vertex AI location where the data store is
    +     * stored.
    +     * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexLocation. + */ + java.lang.String getVertexLocation(); + + /** + * + * + *
    +     * Optional. The name of the Vertex AI location where the data store is
    +     * stored.
    +     * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexLocation. + */ + com.google.protobuf.ByteString getVertexLocationBytes(); + + /** + * + * + *
    +     * Optional. Encryption type for the region. If the encryption type is CMEK,
    +     * the cmek_key_name must be provided. If no encryption type is provided,
    +     * GMEK will be used.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + int getEncryptionTypeValue(); + + /** + * + * + *
    +     * Optional. Encryption type for the region. If the encryption type is CMEK,
    +     * the cmek_key_name must be provided. If no encryption type is provided,
    +     * GMEK will be used.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionType. + */ + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType getEncryptionType(); } /** @@ -391,6 +469,8 @@ private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Config() { cmekKeyName_ = ""; + vertexLocation_ = ""; + encryptionType_ = 0; } @java.lang.Override @@ -414,6 +494,169 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.apihub.v1.ApiHubInstance.Config.Builder.class); } + /** + * + * + *
    +     * Types of data encryption.
    +     * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType} + */ + public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Encryption type unspecified.
    +       * 
    + * + * ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + ENCRYPTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +       * Default encryption using Google managed encryption key.
    +       * 
    + * + * GMEK = 1; + */ + GMEK(1), + /** + * + * + *
    +       * Encryption using customer managed encryption key.
    +       * 
    + * + * CMEK = 2; + */ + CMEK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * Encryption type unspecified.
    +       * 
    + * + * ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ENCRYPTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +       * Default encryption using Google managed encryption key.
    +       * 
    + * + * GMEK = 1; + */ + public static final int GMEK_VALUE = 1; + + /** + * + * + *
    +       * Encryption using customer managed encryption key.
    +       * 
    + * + * CMEK = 2; + */ + public static final int CMEK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EncryptionType 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 EncryptionType forNumber(int value) { + switch (value) { + case 0: + return ENCRYPTION_TYPE_UNSPECIFIED; + case 1: + return GMEK; + case 2: + return CMEK; + 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 EncryptionType findValueByNumber(int number) { + return EncryptionType.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.apihub.v1.ApiHubInstance.Config.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EncryptionType[] VALUES = values(); + + public static EncryptionType 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 EncryptionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType) + } + public static final int CMEK_KEY_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -423,13 +666,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -     * Required. The Customer Managed Encryption Key (CMEK) used for data
    +     * Optional. The Customer Managed Encryption Key (CMEK) used for data
          * encryption. The CMEK name should follow the format of
          * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
          * where the location must match the instance location.
    +     * If the CMEK is not provided, a GMEK will be created for the instance.
          * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cmekKeyName. */ @@ -450,13 +694,14 @@ public java.lang.String getCmekKeyName() { * * *
    -     * Required. The Customer Managed Encryption Key (CMEK) used for data
    +     * Optional. The Customer Managed Encryption Key (CMEK) used for data
          * encryption. The CMEK name should follow the format of
          * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
          * where the location must match the instance location.
    +     * If the CMEK is not provided, a GMEK will be created for the instance.
          * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cmekKeyName. */ @@ -473,6 +718,129 @@ public com.google.protobuf.ByteString getCmekKeyNameBytes() { } } + public static final int DISABLE_SEARCH_FIELD_NUMBER = 2; + private boolean disableSearch_ = false; + + /** + * + * + *
    +     * Optional. If true, the search will be disabled for the instance. The
    +     * default value is false.
    +     * 
    + * + * bool disable_search = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSearch. + */ + @java.lang.Override + public boolean getDisableSearch() { + return disableSearch_; + } + + public static final int VERTEX_LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vertexLocation_ = ""; + + /** + * + * + *
    +     * Optional. The name of the Vertex AI location where the data store is
    +     * stored.
    +     * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexLocation. + */ + @java.lang.Override + public java.lang.String getVertexLocation() { + java.lang.Object ref = vertexLocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vertexLocation_ = s; + return s; + } + } + + /** + * + * + *
    +     * Optional. The name of the Vertex AI location where the data store is
    +     * stored.
    +     * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVertexLocationBytes() { + java.lang.Object ref = vertexLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vertexLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 4; + private int encryptionType_ = 0; + + /** + * + * + *
    +     * Optional. Encryption type for the region. If the encryption type is CMEK,
    +     * the cmek_key_name must be provided. If no encryption type is provided,
    +     * GMEK will be used.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + @java.lang.Override + public int getEncryptionTypeValue() { + return encryptionType_; + } + + /** + * + * + *
    +     * Optional. Encryption type for the region. If the encryption type is CMEK,
    +     * the cmek_key_name must be provided. If no encryption type is provided,
    +     * GMEK will be used.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType getEncryptionType() { + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType result = + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType.forNumber( + encryptionType_); + return result == null + ? com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -490,6 +858,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cmekKeyName_); } + if (disableSearch_ != false) { + output.writeBool(2, disableSearch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexLocation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vertexLocation_); + } + if (encryptionType_ + != com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, encryptionType_); + } getUnknownFields().writeTo(output); } @@ -502,6 +882,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cmekKeyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cmekKeyName_); } + if (disableSearch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, disableSearch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexLocation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vertexLocation_); + } + if (encryptionType_ + != com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType + .ENCRYPTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, encryptionType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -519,6 +911,9 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.apihub.v1.ApiHubInstance.Config) obj; if (!getCmekKeyName().equals(other.getCmekKeyName())) return false; + if (getDisableSearch() != other.getDisableSearch()) return false; + if (!getVertexLocation().equals(other.getVertexLocation())) return false; + if (encryptionType_ != other.encryptionType_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -532,6 +927,12 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CMEK_KEY_NAME_FIELD_NUMBER; hash = (53 * hash) + getCmekKeyName().hashCode(); + hash = (37 * hash) + DISABLE_SEARCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableSearch()); + hash = (37 * hash) + VERTEX_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getVertexLocation().hashCode(); + hash = (37 * hash) + ENCRYPTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + encryptionType_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -675,6 +1076,9 @@ public Builder clear() { super.clear(); bitField0_ = 0; cmekKeyName_ = ""; + disableSearch_ = false; + vertexLocation_ = ""; + encryptionType_ = 0; return this; } @@ -714,6 +1118,15 @@ private void buildPartial0(com.google.cloud.apihub.v1.ApiHubInstance.Config resu if (((from_bitField0_ & 0x00000001) != 0)) { result.cmekKeyName_ = cmekKeyName_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.disableSearch_ = disableSearch_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vertexLocation_ = vertexLocation_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.encryptionType_ = encryptionType_; + } } @java.lang.Override @@ -769,6 +1182,17 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.ApiHubInstance.Config other) bitField0_ |= 0x00000001; onChanged(); } + if (other.getDisableSearch() != false) { + setDisableSearch(other.getDisableSearch()); + } + if (!other.getVertexLocation().isEmpty()) { + vertexLocation_ = other.vertexLocation_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.encryptionType_ != 0) { + setEncryptionTypeValue(other.getEncryptionTypeValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -801,6 +1225,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 16: + { + disableSearch_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + vertexLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + encryptionType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -826,13 +1268,14 @@ public Builder mergeFrom( * * *
    -       * Required. The Customer Managed Encryption Key (CMEK) used for data
    +       * Optional. The Customer Managed Encryption Key (CMEK) used for data
            * encryption. The CMEK name should follow the format of
            * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
            * where the location must match the instance location.
    +       * If the CMEK is not provided, a GMEK will be created for the instance.
            * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cmekKeyName. */ @@ -852,13 +1295,14 @@ public java.lang.String getCmekKeyName() { * * *
    -       * Required. The Customer Managed Encryption Key (CMEK) used for data
    +       * Optional. The Customer Managed Encryption Key (CMEK) used for data
            * encryption. The CMEK name should follow the format of
            * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
            * where the location must match the instance location.
    +       * If the CMEK is not provided, a GMEK will be created for the instance.
            * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cmekKeyName. */ @@ -878,13 +1322,14 @@ public com.google.protobuf.ByteString getCmekKeyNameBytes() { * * *
    -       * Required. The Customer Managed Encryption Key (CMEK) used for data
    +       * Optional. The Customer Managed Encryption Key (CMEK) used for data
            * encryption. The CMEK name should follow the format of
            * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
            * where the location must match the instance location.
    +       * If the CMEK is not provided, a GMEK will be created for the instance.
            * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The cmekKeyName to set. * @return This builder for chaining. @@ -903,13 +1348,14 @@ public Builder setCmekKeyName(java.lang.String value) { * * *
    -       * Required. The Customer Managed Encryption Key (CMEK) used for data
    +       * Optional. The Customer Managed Encryption Key (CMEK) used for data
            * encryption. The CMEK name should follow the format of
            * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
            * where the location must match the instance location.
    +       * If the CMEK is not provided, a GMEK will be created for the instance.
            * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -924,13 +1370,14 @@ public Builder clearCmekKeyName() { * * *
    -       * Required. The Customer Managed Encryption Key (CMEK) used for data
    +       * Optional. The Customer Managed Encryption Key (CMEK) used for data
            * encryption. The CMEK name should follow the format of
            * `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
            * where the location must match the instance location.
    +       * If the CMEK is not provided, a GMEK will be created for the instance.
            * 
    * - * string cmek_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string cmek_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for cmekKeyName to set. * @return This builder for chaining. @@ -946,6 +1393,300 @@ public Builder setCmekKeyNameBytes(com.google.protobuf.ByteString value) { return this; } + private boolean disableSearch_; + + /** + * + * + *
    +       * Optional. If true, the search will be disabled for the instance. The
    +       * default value is false.
    +       * 
    + * + * bool disable_search = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSearch. + */ + @java.lang.Override + public boolean getDisableSearch() { + return disableSearch_; + } + + /** + * + * + *
    +       * Optional. If true, the search will be disabled for the instance. The
    +       * default value is false.
    +       * 
    + * + * bool disable_search = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disableSearch to set. + * @return This builder for chaining. + */ + public Builder setDisableSearch(boolean value) { + + disableSearch_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. If true, the search will be disabled for the instance. The
    +       * default value is false.
    +       * 
    + * + * bool disable_search = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisableSearch() { + bitField0_ = (bitField0_ & ~0x00000002); + disableSearch_ = false; + onChanged(); + return this; + } + + private java.lang.Object vertexLocation_ = ""; + + /** + * + * + *
    +       * Optional. The name of the Vertex AI location where the data store is
    +       * stored.
    +       * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexLocation. + */ + public java.lang.String getVertexLocation() { + java.lang.Object ref = vertexLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vertexLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Vertex AI location where the data store is
    +       * stored.
    +       * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexLocation. + */ + public com.google.protobuf.ByteString getVertexLocationBytes() { + java.lang.Object ref = vertexLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vertexLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Optional. The name of the Vertex AI location where the data store is
    +       * stored.
    +       * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vertexLocation to set. + * @return This builder for chaining. + */ + public Builder setVertexLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vertexLocation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Vertex AI location where the data store is
    +       * stored.
    +       * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVertexLocation() { + vertexLocation_ = getDefaultInstance().getVertexLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The name of the Vertex AI location where the data store is
    +       * stored.
    +       * 
    + * + * string vertex_location = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for vertexLocation to set. + * @return This builder for chaining. + */ + public Builder setVertexLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vertexLocation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int encryptionType_ = 0; + + /** + * + * + *
    +       * Optional. Encryption type for the region. If the encryption type is CMEK,
    +       * the cmek_key_name must be provided. If no encryption type is provided,
    +       * GMEK will be used.
    +       * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for encryptionType. + */ + @java.lang.Override + public int getEncryptionTypeValue() { + return encryptionType_; + } + + /** + * + * + *
    +       * Optional. Encryption type for the region. If the encryption type is CMEK,
    +       * the cmek_key_name must be provided. If no encryption type is provided,
    +       * GMEK will be used.
    +       * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for encryptionType to set. + * @return This builder for chaining. + */ + public Builder setEncryptionTypeValue(int value) { + encryptionType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Encryption type for the region. If the encryption type is CMEK,
    +       * the cmek_key_name must be provided. If no encryption type is provided,
    +       * GMEK will be used.
    +       * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType getEncryptionType() { + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType result = + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType.forNumber( + encryptionType_); + return result == null + ? com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +       * Optional. Encryption type for the region. If the encryption type is CMEK,
    +       * the cmek_key_name must be provided. If no encryption type is provided,
    +       * GMEK will be used.
    +       * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The encryptionType to set. + * @return This builder for chaining. + */ + public Builder setEncryptionType( + com.google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + encryptionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. Encryption type for the region. If the encryption type is CMEK,
    +       * the cmek_key_name must be provided. If no encryption type is provided,
    +       * GMEK will be used.
    +       * 
    + * + * + * .google.cloud.apihub.v1.ApiHubInstance.Config.EncryptionType encryption_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEncryptionType() { + bitField0_ = (bitField0_ & ~0x00000008); + encryptionType_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResource.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResource.java index 7d7b70bc53f9..695cab0e1df4 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResource.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResource.java @@ -189,7 +189,7 @@ public com.google.cloud.apihub.v1.ApiOrBuilder getApiOrBuilder() { * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -206,7 +206,7 @@ public boolean hasOperation() { * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -226,7 +226,7 @@ public com.google.cloud.apihub.v1.ApiOperation getOperation() { * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -246,7 +246,8 @@ public com.google.cloud.apihub.v1.ApiOperationOrBuilder getOperationOrBuilder() * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -263,7 +264,8 @@ public boolean hasDeployment() { * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -283,7 +285,8 @@ public com.google.cloud.apihub.v1.Deployment getDeployment() { * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -303,7 +306,8 @@ public com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder() { * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -320,7 +324,8 @@ public boolean hasSpec() { * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -340,7 +345,8 @@ public com.google.cloud.apihub.v1.Spec getSpec() { * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -417,7 +423,8 @@ public com.google.cloud.apihub.v1.DefinitionOrBuilder getDefinitionOrBuilder() { * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -434,7 +441,8 @@ public boolean hasVersion() { * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -454,7 +462,8 @@ public com.google.cloud.apihub.v1.Version getVersion() { * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -1249,7 +1258,7 @@ public com.google.cloud.apihub.v1.ApiOrBuilder getApiOrBuilder() { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1266,7 +1275,7 @@ public boolean hasOperation() { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1293,7 +1302,7 @@ public com.google.cloud.apihub.v1.ApiOperation getOperation() { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1317,7 +1326,7 @@ public Builder setOperation(com.google.cloud.apihub.v1.ApiOperation value) { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1338,7 +1347,7 @@ public Builder setOperation(com.google.cloud.apihub.v1.ApiOperation.Builder buil * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1372,7 +1381,7 @@ public Builder mergeOperation(com.google.cloud.apihub.v1.ApiOperation value) { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1399,7 +1408,7 @@ public Builder clearOperation() { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1413,7 +1422,7 @@ public com.google.cloud.apihub.v1.ApiOperation.Builder getOperationBuilder() { * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1435,7 +1444,7 @@ public com.google.cloud.apihub.v1.ApiOperationOrBuilder getOperationOrBuilder() * *
          * This represents ApiOperation resource in search results. Only name,
    -     * and description fields are populated in search results.
    +     * description, spec and details fields are populated in search results.
          * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -1475,7 +1484,8 @@ public com.google.cloud.apihub.v1.ApiOperationOrBuilder getOperationOrBuilder() * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1492,7 +1502,8 @@ public boolean hasDeployment() { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1519,7 +1530,8 @@ public com.google.cloud.apihub.v1.Deployment getDeployment() { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1543,7 +1555,8 @@ public Builder setDeployment(com.google.cloud.apihub.v1.Deployment value) { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1564,7 +1577,8 @@ public Builder setDeployment(com.google.cloud.apihub.v1.Deployment.Builder build * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1598,7 +1612,8 @@ public Builder mergeDeployment(com.google.cloud.apihub.v1.Deployment value) { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1625,7 +1640,8 @@ public Builder clearDeployment() { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1639,7 +1655,8 @@ public com.google.cloud.apihub.v1.Deployment.Builder getDeploymentBuilder() { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1661,7 +1678,8 @@ public com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder() { * *
          * This represents Deployment resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, deployment_type and api_versions fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -1701,7 +1719,8 @@ public com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1718,7 +1737,8 @@ public boolean hasSpec() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1745,7 +1765,8 @@ public com.google.cloud.apihub.v1.Spec getSpec() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1769,7 +1790,8 @@ public Builder setSpec(com.google.cloud.apihub.v1.Spec value) { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1790,7 +1812,8 @@ public Builder setSpec(com.google.cloud.apihub.v1.Spec.Builder builderForValue) * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1824,7 +1847,8 @@ public Builder mergeSpec(com.google.cloud.apihub.v1.Spec value) { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1851,7 +1875,8 @@ public Builder clearSpec() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1865,7 +1890,8 @@ public com.google.cloud.apihub.v1.Spec.Builder getSpecBuilder() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -1887,7 +1913,8 @@ public com.google.cloud.apihub.v1.SpecOrBuilder getSpecOrBuilder() { * *
          * This represents Spec resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, spec_type and documentation fields are
    +     * populated in search results.
          * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -2151,7 +2178,8 @@ public com.google.cloud.apihub.v1.DefinitionOrBuilder getDefinitionOrBuilder() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2168,7 +2196,8 @@ public boolean hasVersion() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2195,7 +2224,8 @@ public com.google.cloud.apihub.v1.Version getVersion() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2219,7 +2249,8 @@ public Builder setVersion(com.google.cloud.apihub.v1.Version value) { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2240,7 +2271,8 @@ public Builder setVersion(com.google.cloud.apihub.v1.Version.Builder builderForV * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2274,7 +2306,8 @@ public Builder mergeVersion(com.google.cloud.apihub.v1.Version value) { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2301,7 +2334,8 @@ public Builder clearVersion() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2315,7 +2349,8 @@ public com.google.cloud.apihub.v1.Version.Builder getVersionBuilder() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -2337,7 +2372,8 @@ public com.google.cloud.apihub.v1.VersionOrBuilder getVersionOrBuilder() { * *
          * This represents Version resource in search results. Only name,
    -     * display_name and description fields are populated in search results.
    +     * display_name, description, lifecycle, compliance and accreditation fields
    +     * are populated in search results.
          * 
    * * .google.cloud.apihub.v1.Version version = 6; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResourceOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResourceOrBuilder.java index fb3719fb631b..cd0d6d2c88e8 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResourceOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubResourceOrBuilder.java @@ -69,7 +69,7 @@ public interface ApiHubResourceOrBuilder * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -83,7 +83,7 @@ public interface ApiHubResourceOrBuilder * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -97,7 +97,7 @@ public interface ApiHubResourceOrBuilder * *
        * This represents ApiOperation resource in search results. Only name,
    -   * and description fields are populated in search results.
    +   * description, spec and details fields are populated in search results.
        * 
    * * .google.cloud.apihub.v1.ApiOperation operation = 2; @@ -109,7 +109,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -123,7 +124,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -137,7 +139,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Deployment resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, deployment_type and api_versions fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Deployment deployment = 3; @@ -149,7 +152,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -163,7 +167,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -177,7 +182,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Spec resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, spec_type and documentation fields are
    +   * populated in search results.
        * 
    * * .google.cloud.apihub.v1.Spec spec = 4; @@ -229,7 +235,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -243,7 +250,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; @@ -257,7 +265,8 @@ public interface ApiHubResourceOrBuilder * *
        * This represents Version resource in search results. Only name,
    -   * display_name and description fields are populated in search results.
    +   * display_name, description, lifecycle, compliance and accreditation fields
    +   * are populated in search results.
        * 
    * * .google.cloud.apihub.v1.Version version = 6; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubServiceProto.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubServiceProto.java index a9affc1b49d9..11974e2946fb 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubServiceProto.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiHubServiceProto.java @@ -104,10 +104,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_apihub_v1_GetSpecContentsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_apihub_v1_GetSpecContentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_apihub_v1_GetApiOperationRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_apihub_v1_GetApiOperationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_UpdateApiOperationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_UpdateApiOperationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_apihub_v1_ListApiOperationsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -322,13 +334,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017next_page_token\030\002 \001(\t\"J\n" + "\026GetSpecContentsRequest\0220\n" + "\004name\030\001 \001(\tB\"\340A\002\372A\034\n" - + "\032apihub.googleapis.com/Spec\"R\n" + + "\032apihub.googleapis.com/Spec\"\270\001\n" + + "\031CreateApiOperationRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"apihub.googleapis.com/ApiOperation\022\035\n" + + "\020api_operation_id\030\002 \001(\tB\003\340A\001\022@\n\r" + + "api_operation\030\003" + + " \001(\0132$.google.cloud.apihub.v1.ApiOperationB\003\340A\002\"R\n" + "\026GetApiOperationRequest\0228\n" + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"apihub.googleapis.com/ApiOperation\"\223\001\n" + + "\031UpdateApiOperationRequest\022@\n\r" + + "api_operation\030\001" + + " \001(\0132$.google.cloud.apihub.v1.ApiOperationB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"U\n" + + "\031DeleteApiOperationRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + "\"apihub.googleapis.com/ApiOperation\"\234\001\n" + "\030ListApiOperationsRequest\022:\n" - + "\006parent\030\001 \001(" - + "\tB*\340A\002\372A$\022\"apihub.googleapis.com/ApiOperation\022\023\n" + + "\006parent\030\001 \001(\t" + + "B*\340A\002\372A$\022\"apihub.googleapis.com/ApiOperation\022\023\n" + "\006filter\030\002 \001(\tB\003\340A\001\022\026\n" + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\004 \001(\tB\003\340A\001\"r\n" @@ -431,14 +456,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB)\340A\002\372A#\022!apihub.googleapis.com/ExternalApi\022\034\n" + "\017external_api_id\030\002 \001(\tB\003\340A\001\022>\n" - + "\014external_api\030\003 \001(" - + "\0132#.google.cloud.apihub.v1.ExternalApiB\003\340A\002\"P\n" + + "\014external_api\030\003" + + " \001(\0132#.google.cloud.apihub.v1.ExternalApiB\003\340A\002\"P\n" + "\025GetExternalApiRequest\0227\n" + "\004name\030\001 \001(\tB)\340A\002\372A#\n" + "!apihub.googleapis.com/ExternalApi\"\220\001\n" + "\030UpdateExternalApiRequest\022>\n" - + "\014external_api\030\001" - + " \001(\0132#.google.cloud.apihub.v1.ExternalApiB\003\340A\002\0224\n" + + "\014external_api\030\001 \001(\013" + + "2#.google.cloud.apihub.v1.ExternalApiB\003\340A\002\0224\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"S\n" + "\030DeleteExternalApiRequest\0227\n" + "\004name\030\001 \001(\tB)\340A\002\372A#\n" @@ -450,162 +475,175 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "page_token\030\003 \001(\tB\003\340A\001\"o\n" + "\030ListExternalApisResponse\022:\n\r" + "external_apis\030\001 \003(\0132#.google.cloud.apihub.v1.ExternalApi\022\027\n" - + "\017next_page_token\030\002 \001(\t2\2721\n" + + "\017next_page_token\030\002 \001(\t2\3226\n" + "\006ApiHub\022\235\001\n" - + "\tCreateApi\022(.google.cloud.apihub.v1.CreateApiRequest\032\033.goog" - + "le.cloud.apihub.v1.Api\"I\332A\021parent,api,ap" - + "i_id\202\323\344\223\002/\"(/v1/{parent=projects/*/locations/*}/apis:\003api\022\205\001\n" - + "\006GetApi\022%.google.cloud.apihub.v1.GetApiRequest\032\033.google.clo" - + "ud.apihub.v1.Api\"7\332A\004name\202\323\344\223\002*\022(/v1/{name=projects/*/locations/*/apis/*}\022\230\001\n" - + "\010ListApis\022\'.google.cloud.apihub.v1.ListApis" - + "Request\032(.google.cloud.apihub.v1.ListApi" - + "sResponse\"9\332A\006parent\202\323\344\223\002*\022(/v1/{parent=projects/*/locations/*}/apis\022\237\001\n" - + "\tUpdateApi\022(.google.cloud.apihub.v1.UpdateApiReq" - + "uest\032\033.google.cloud.apihub.v1.Api\"K\332A\017ap" - + "i,update_mask\202\323\344\223\00232,/v1/{api.name=projects/*/locations/*/apis/*}:\003api\022\206\001\n" - + "\tDeleteApi\022(.google.cloud.apihub.v1.DeleteApiR" - + "equest\032\026.google.protobuf.Empty\"7\332A\004name\202" - + "\323\344\223\002**(/v1/{name=projects/*/locations/*/apis/*}\022\300\001\n\r" - + "CreateVersion\022,.google.cloud.apihub.v1.CreateVersionRequest\032\037.google" - + ".cloud.apihub.v1.Version\"`\332A\031parent,vers" - + "ion,version_id\202\323\344\223\002>\"3/v1/{parent=projec" - + "ts/*/locations/*/apis/*}/versions:\007version\022\234\001\n\n" - + "GetVersion\022).google.cloud.apihub.v1.GetVersionRequest\032\037.google.cloud.apih" - + "ub.v1.Version\"B\332A\004name\202\323\344\223\0025\0223/v1/{name=" - + "projects/*/locations/*/apis/*/versions/*}\022\257\001\n" - + "\014ListVersions\022+.google.cloud.apihub.v1.ListVersionsRequest\032,.google.cloud.a" - + "pihub.v1.ListVersionsResponse\"D\332A\006parent" - + "\202\323\344\223\0025\0223/v1/{parent=projects/*/locations/*/apis/*}/versions\022\302\001\n\r" - + "UpdateVersion\022,.google.cloud.apihub.v1.UpdateVersionRequ" - + "est\032\037.google.cloud.apihub.v1.Version\"b\332A" - + "\023version,update_mask\202\323\344\223\002F2;/v1/{version" - + ".name=projects/*/locations/*/apis/*/versions/*}:\007version\022\231\001\n\r" - + "DeleteVersion\022,.google.cloud.apihub.v1.DeleteVersionRequest" - + "\032\026.google.protobuf.Empty\"B\332A\004name\202\323\344\223\0025*" - + "3/v1/{name=projects/*/locations/*/apis/*/versions/*}\022\266\001\n\n" - + "CreateSpec\022).google.cloud.apihub.v1.CreateSpecRequest\032\034.google." - + "cloud.apihub.v1.Spec\"_\332A\023parent,spec,spe" - + "c_id\202\323\344\223\002C\";/v1/{parent=projects/*/locat" - + "ions/*/apis/*/versions/*}/specs:\004spec\022\233\001\n" - + "\007GetSpec\022&.google.cloud.apihub.v1.GetSp" - + "ecRequest\032\034.google.cloud.apihub.v1.Spec\"" - + "J\332A\004name\202\323\344\223\002=\022;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\022\274\001\n" - + "\017GetSpecContents\022..google.cloud.apihub.v1" - + ".GetSpecContentsRequest\032$.google.cloud.a" - + "pihub.v1.SpecContents\"S\332A\004name\202\323\344\223\002F\022D/v" - + "1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:contents\022\256\001\n" - + "\tListSpecs\022(.google.cloud.apihub.v1.ListSpecsReque" - + "st\032).google.cloud.apihub.v1.ListSpecsRes" - + "ponse\"L\332A\006parent\202\323\344\223\002=\022;/v1/{parent=proj" - + "ects/*/locations/*/apis/*/versions/*}/specs\022\270\001\n\n" - + "UpdateSpec\022).google.cloud.apihub.v1.UpdateSpecRequest\032\034.google.cloud.api" - + "hub.v1.Spec\"a\332A\020spec,update_mask\202\323\344\223\002H2@" - + "/v1/{spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}:\004spec\022\233\001\n\n" - + "DeleteSpec\022).google.cloud.apihub.v1.DeleteSpe" - + "cRequest\032\026.google.protobuf.Empty\"J\332A\004nam" - + "e\202\323\344\223\002=*;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\022\270\001\n" - + "\017GetApiOperation\022..google.cloud.apihub.v1.GetApi" - + "OperationRequest\032$.google.cloud.apihub.v" - + "1.ApiOperation\"O\332A\004name\202\323\344\223\002B\022@/v1/{name" - + "=projects/*/locations/*/apis/*/versions/*/operations/*}\022\313\001\n" - + "\021ListApiOperations\0220.google.cloud.apihub.v1.ListApiOperations" - + "Request\0321.google.cloud.apihub.v1.ListApi" - + "OperationsResponse\"Q\332A\006parent\202\323\344\223\002B\022@/v1" - + "/{parent=projects/*/locations/*/apis/*/versions/*}/operations\022\263\001\n\r" - + "GetDefinition\022,.google.cloud.apihub.v1.GetDefinitionRe" - + "quest\032\".google.cloud.apihub.v1.Definitio" - + "n\"P\332A\004name\202\323\344\223\002C\022A/v1/{name=projects/*/l" - + "ocations/*/apis/*/versions/*/definitions/*}\022\316\001\n" - + "\020CreateDeployment\022/.google.cloud.apihub.v1.CreateDeploymentRequest\032\".goog" - + "le.cloud.apihub.v1.Deployment\"e\332A\037parent" - + ",deployment,deployment_id\202\323\344\223\002=\"//v1/{pa" - + "rent=projects/*/locations/*}/deployments:\n" + + "\tCreateApi\022(.google.cloud.apihub.v1.CreateApiRequest\032\033.google.cloud.apihub." + + "v1.Api\"I\332A\021parent,api,api_id\202\323\344\223\002/\"(/v1/" + + "{parent=projects/*/locations/*}/apis:\003api\022\205\001\n" + + "\006GetApi\022%.google.cloud.apihub.v1.Ge" + + "tApiRequest\032\033.google.cloud.apihub.v1.Api" + + "\"7\332A\004name\202\323\344\223\002*\022(/v1/{name=projects/*/locations/*/apis/*}\022\230\001\n" + + "\010ListApis\022\'.google.cloud.apihub.v1.ListApisRequest\032(.google" + + ".cloud.apihub.v1.ListApisResponse\"9\332A\006pa" + + "rent\202\323\344\223\002*\022(/v1/{parent=projects/*/locations/*}/apis\022\237\001\n" + + "\tUpdateApi\022(.google.cloud.apihub.v1.UpdateApiRequest\032\033.google.cl" + + "oud.apihub.v1.Api\"K\332A\017api,update_mask\202\323\344" + + "\223\00232,/v1/{api.name=projects/*/locations/*/apis/*}:\003api\022\206\001\n" + + "\tDeleteApi\022(.google.cloud.apihub.v1.DeleteApiRequest\032\026.google." + + "protobuf.Empty\"7\332A\004name\202\323\344\223\002**(/v1/{name=projects/*/locations/*/apis/*}\022\300\001\n\r" + + "CreateVersion\022,.google.cloud.apihub.v1.Creat" + + "eVersionRequest\032\037.google.cloud.apihub.v1" + + ".Version\"`\332A\031parent,version,version_id\202\323" + + "\344\223\002>\"3/v1/{parent=projects/*/locations/*/apis/*}/versions:\007version\022\234\001\n\n" + + "GetVersion\022).google.cloud.apihub.v1.GetVersionReq" + + "uest\032\037.google.cloud.apihub.v1.Version\"B\332" + + "A\004name\202\323\344\223\0025\0223/v1/{name=projects/*/locations/*/apis/*/versions/*}\022\257\001\n" + + "\014ListVersions\022+.google.cloud.apihub.v1.ListVersions" + + "Request\032,.google.cloud.apihub.v1.ListVer" + + "sionsResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{par" + + "ent=projects/*/locations/*/apis/*}/versions\022\302\001\n\r" + + "UpdateVersion\022,.google.cloud.apihub.v1.UpdateVersionRequest\032\037.google.clo" + + "ud.apihub.v1.Version\"b\332A\023version,update_" + + "mask\202\323\344\223\002F2;/v1/{version.name=projects/*" + + "/locations/*/apis/*/versions/*}:\007version\022\231\001\n\r" + + "DeleteVersion\022,.google.cloud.apihub.v1.DeleteVersionRequest\032\026.google.protob" + + "uf.Empty\"B\332A\004name\202\323\344\223\0025*3/v1/{name=projects/*/locations/*/apis/*/versions/*}\022\266\001\n" + + "\n" + + "CreateSpec\022).google.cloud.apihub.v1.Cre" + + "ateSpecRequest\032\034.google.cloud.apihub.v1." + + "Spec\"_\332A\023parent,spec,spec_id\202\323\344\223\002C\";/v1/" + + "{parent=projects/*/locations/*/apis/*/versions/*}/specs:\004spec\022\233\001\n" + + "\007GetSpec\022&.google.cloud.apihub.v1.GetSpecRequest\032\034.goog" + + "le.cloud.apihub.v1.Spec\"J\332A\004name\202\323\344\223\002=\022;" + + "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\022\274\001\n" + + "\017GetSpecContents\022..google.cloud.apihub.v1.GetSpecContents" + + "Request\032$.google.cloud.apihub.v1.SpecCon" + + "tents\"S\332A\004name\202\323\344\223\002F\022D/v1/{name=projects" + + "/*/locations/*/apis/*/versions/*/specs/*}:contents\022\256\001\n" + + "\tListSpecs\022(.google.cloud.apihub.v1.ListSpecsRequest\032).google.clou" + + "d.apihub.v1.ListSpecsResponse\"L\332A\006parent" + + "\202\323\344\223\002=\022;/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs\022\270\001\n\n" + + "UpdateSpec\022).google.cloud.apihub.v1.UpdateSpecRe" + + "quest\032\034.google.cloud.apihub.v1.Spec\"a\332A\020" + + "spec,update_mask\202\323\344\223\002H2@/v1/{spec.name=p" + + "rojects/*/locations/*/apis/*/versions/*/specs/*}:\004spec\022\233\001\n\n" + + "DeleteSpec\022).google.cloud.apihub.v1.DeleteSpecRequest\032\026.googl" + + "e.protobuf.Empty\"J\332A\004name\202\323\344\223\002=*;/v1/{na" + + "me=projects/*/locations/*/apis/*/versions/*/specs/*}\022\356\001\n" + + "\022CreateApiOperation\0221.google.cloud.apihub.v1.CreateApiOperationR" + + "equest\032$.google.cloud.apihub.v1.ApiOpera" + + "tion\"\177\332A%parent,api_operation,api_operat" + + "ion_id\202\323\344\223\002Q\"@/v1/{parent=projects/*/locations/*/apis/*/versions/*}/operations:\r" + + "api_operation\022\270\001\n" + + "\017GetApiOperation\022..google.cloud.apihub.v1.GetApiOperationReques" + + "t\032$.google.cloud.apihub.v1.ApiOperation\"" + + "O\332A\004name\202\323\344\223\002B\022@/v1/{name=projects/*/loc" + + "ations/*/apis/*/versions/*/operations/*}\022\313\001\n" + + "\021ListApiOperations\0220.google.cloud.apihub.v1.ListApiOperationsRequest\0321.googl" + + "e.cloud.apihub.v1.ListApiOperationsRespo" + + "nse\"Q\332A\006parent\202\323\344\223\002B\022@/v1/{parent=projec" + + "ts/*/locations/*/apis/*/versions/*}/operations\022\361\001\n" + + "\022UpdateApiOperation\0221.google.cloud.apihub.v1.UpdateApiOperationRequest" + + "\032$.google.cloud.apihub.v1.ApiOperation\"\201" + + "\001\332A\031api_operation,update_mask\202\323\344\223\002_2N/v1" + + "/{api_operation.name=projects/*/locations/*/apis/*/versions/*/operations/*}:\r" + + "api_operation\022\260\001\n" + + "\022DeleteApiOperation\0221.google.cloud.apihub.v1.DeleteApiOperationReq" + + "uest\032\026.google.protobuf.Empty\"O\332A\004name\202\323\344" + + "\223\002B*@/v1/{name=projects/*/locations/*/apis/*/versions/*/operations/*}\022\263\001\n\r" + + "GetDefinition\022,.google.cloud.apihub.v1.GetDefi" + + "nitionRequest\032\".google.cloud.apihub.v1.D" + + "efinition\"P\332A\004name\202\323\344\223\002C\022A/v1/{name=proj" + + "ects/*/locations/*/apis/*/versions/*/definitions/*}\022\316\001\n" + + "\020CreateDeployment\022/.google.cloud.apihub.v1.CreateDeploymentReques" + + "t\032\".google.cloud.apihub.v1.Deployment\"e\332" + + "A\037parent,deployment,deployment_id\202\323\344\223\002=\"" + + "//v1/{parent=projects/*/locations/*}/deployments:\n" + "deployment\022\241\001\n\r" - + "GetDeployment\022,.google.cloud.apihub.v1.GetDeploymentRequest\032\".g" - + "oogle.cloud.apihub.v1.Deployment\">\332A\004nam" - + "e\202\323\344\223\0021\022//v1/{name=projects/*/locations/*/deployments/*}\022\264\001\n" - + "\017ListDeployments\022..google.cloud.apihub.v1.ListDeploymentsReq" - + "uest\032/.google.cloud.apihub.v1.ListDeploy" - + "mentsResponse\"@\332A\006parent\202\323\344\223\0021\022//v1/{par" - + "ent=projects/*/locations/*}/deployments\022\320\001\n" - + "\020UpdateDeployment\022/.google.cloud.apih" - + "ub.v1.UpdateDeploymentRequest\032\".google.c" - + "loud.apihub.v1.Deployment\"g\332A\026deployment" - + ",update_mask\202\323\344\223\002H2:/v1/{deployment.name=projects/*/locations/*/deployments/*}:\n" + + "GetDeployment\022,.google.cloud.apihub.v1.GetDeploymentReq" + + "uest\032\".google.cloud.apihub.v1.Deployment" + + "\">\332A\004name\202\323\344\223\0021\022//v1/{name=projects/*/locations/*/deployments/*}\022\264\001\n" + + "\017ListDeployments\022..google.cloud.apihub.v1.ListDeploy" + + "mentsRequest\032/.google.cloud.apihub.v1.Li" + + "stDeploymentsResponse\"@\332A\006parent\202\323\344\223\0021\022/" + + "/v1/{parent=projects/*/locations/*}/deployments\022\320\001\n" + + "\020UpdateDeployment\022/.google.cloud.apihub.v1.UpdateDeploymentRequest\032\"." + + "google.cloud.apihub.v1.Deployment\"g\332A\026de" + + "ployment,update_mask\202\323\344\223\002H2:/v1/{deploym" + + "ent.name=projects/*/locations/*/deployments/*}:\n" + "deployment\022\233\001\n" - + "\020DeleteDeployment\022/.google.cloud.apihub.v1.DeleteDeploymentRequest" - + "\032\026.google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*" - + "//v1/{name=projects/*/locations/*/deployments/*}\022\307\001\n" - + "\017CreateAttribute\022..google.cloud.apihub.v1.CreateAttributeRequest\032!.g" - + "oogle.cloud.apihub.v1.Attribute\"a\332A\035pare" - + "nt,attribute,attribute_id\202\323\344\223\002;\"./v1/{pa" - + "rent=projects/*/locations/*}/attributes:\tattribute\022\235\001\n" - + "\014GetAttribute\022+.google.cloud.apihub.v1.GetAttributeRequest\032!.googl" - + "e.cloud.apihub.v1.Attribute\"=\332A\004name\202\323\344\223" - + "\0020\022./v1/{name=projects/*/locations/*/attributes/*}\022\311\001\n" - + "\017UpdateAttribute\022..google.cloud.apihub.v1.UpdateAttributeRequest\032!" - + ".google.cloud.apihub.v1.Attribute\"c\332A\025at" - + "tribute,update_mask\202\323\344\223\002E28/v1/{attribut" - + "e.name=projects/*/locations/*/attributes/*}:\tattribute\022\230\001\n" - + "\017DeleteAttribute\022..google.cloud.apihub.v1.DeleteAttributeReque" - + "st\032\026.google.protobuf.Empty\"=\332A\004name\202\323\344\223\002" - + "0*./v1/{name=projects/*/locations/*/attributes/*}\022\260\001\n" - + "\016ListAttributes\022-.google.cloud.apihub.v1.ListAttributesRequest\032..go" - + "ogle.cloud.apihub.v1.ListAttributesRespo" - + "nse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects/*/locations/*}/attributes\022\305\001\n" - + "\017SearchResources\022..google.cloud.apihub.v1.Search" - + "ResourcesRequest\032/.google.cloud.apihub.v" - + "1.SearchResourcesResponse\"Q\332A\016location,q" - + "uery\202\323\344\223\002:\"5/v1/{location=projects/*/locations/*}:searchResources:\001*\022\330\001\n" - + "\021CreateExternalApi\0220.google.cloud.apihub.v1.Crea" - + "teExternalApiRequest\032#.google.cloud.apih" - + "ub.v1.ExternalApi\"l\332A#parent,external_ap" - + "i,external_api_id\202\323\344\223\002@\"0/v1/{parent=pro" - + "jects/*/locations/*}/externalApis:\014external_api\022\245\001\n" - + "\016GetExternalApi\022-.google.cloud.apihub.v1.GetExternalApiRequest\032#.goog" - + "le.cloud.apihub.v1.ExternalApi\"?\332A\004name\202" - + "\323\344\223\0022\0220/v1/{name=projects/*/locations/*/externalApis/*}\022\332\001\n" - + "\021UpdateExternalApi\0220.google.cloud.apihub.v1.UpdateExternalApi" - + "Request\032#.google.cloud.apihub.v1.Externa" - + "lApi\"n\332A\030external_api,update_mask\202\323\344\223\002M2" - + "=/v1/{external_api.name=projects/*/locations/*/externalApis/*}:\014external_api\022\236\001\n" - + "\021DeleteExternalApi\0220.google.cloud.apihub" - + ".v1.DeleteExternalApiRequest\032\026.google.pr" - + "otobuf.Empty\"?\332A\004name\202\323\344\223\0022*0/v1/{name=p" - + "rojects/*/locations/*/externalApis/*}\022\270\001\n" - + "\020ListExternalApis\022/.google.cloud.apihub" - + ".v1.ListExternalApisRequest\0320.google.clo" - + "ud.apihub.v1.ListExternalApisResponse\"A\332" - + "A\006parent\202\323\344\223\0022\0220/v1/{parent=projects/*/l" - + "ocations/*}/externalApis\032I\312A\025apihub.goog" - + "leapis.com\322A.https://www.googleapis.com/auth/cloud-platform2\204\010\n" + + "\020DeleteDeployment\022/.google.cloud.apihub.v1.DeleteDeploymen" + + "tRequest\032\026.google.protobuf.Empty\">\332A\004nam" + + "e\202\323\344\223\0021*//v1/{name=projects/*/locations/*/deployments/*}\022\307\001\n" + + "\017CreateAttribute\022..google.cloud.apihub.v1.CreateAttributeReq" + + "uest\032!.google.cloud.apihub.v1.Attribute\"" + + "a\332A\035parent,attribute,attribute_id\202\323\344\223\002;\"" + + "./v1/{parent=projects/*/locations/*}/attributes:\tattribute\022\235\001\n" + + "\014GetAttribute\022+.google.cloud.apihub.v1.GetAttributeRequest" + + "\032!.google.cloud.apihub.v1.Attribute\"=\332A\004" + + "name\202\323\344\223\0020\022./v1/{name=projects/*/locations/*/attributes/*}\022\311\001\n" + + "\017UpdateAttribute\022..google.cloud.apihub.v1.UpdateAttributeR" + + "equest\032!.google.cloud.apihub.v1.Attribut" + + "e\"c\332A\025attribute,update_mask\202\323\344\223\002E28/v1/{" + + "attribute.name=projects/*/locations/*/attributes/*}:\tattribute\022\230\001\n" + + "\017DeleteAttribute\022..google.cloud.apihub.v1.DeleteAttrib" + + "uteRequest\032\026.google.protobuf.Empty\"=\332A\004n" + + "ame\202\323\344\223\0020*./v1/{name=projects/*/locations/*/attributes/*}\022\260\001\n" + + "\016ListAttributes\022-.google.cloud.apihub.v1.ListAttributesRequ" + + "est\032..google.cloud.apihub.v1.ListAttribu" + + "tesResponse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects/*/locations/*}/attributes\022\305\001\n" + + "\017SearchResources\022..google.cloud.apihub.v" + + "1.SearchResourcesRequest\032/.google.cloud." + + "apihub.v1.SearchResourcesResponse\"Q\332A\016lo" + + "cation,query\202\323\344\223\002:\"5/v1/{location=projects/*/locations/*}:searchResources:\001*\022\330\001\n" + + "\021CreateExternalApi\0220.google.cloud.apihub" + + ".v1.CreateExternalApiRequest\032#.google.cl" + + "oud.apihub.v1.ExternalApi\"l\332A#parent,ext" + + "ernal_api,external_api_id\202\323\344\223\002@\"0/v1/{pa" + + "rent=projects/*/locations/*}/externalApis:\014external_api\022\245\001\n" + + "\016GetExternalApi\022-.google.cloud.apihub.v1.GetExternalApiReques" + + "t\032#.google.cloud.apihub.v1.ExternalApi\"?" + + "\332A\004name\202\323\344\223\0022\0220/v1/{name=projects/*/locations/*/externalApis/*}\022\332\001\n" + + "\021UpdateExternalApi\0220.google.cloud.apihub.v1.UpdateExt" + + "ernalApiRequest\032#.google.cloud.apihub.v1" + + ".ExternalApi\"n\332A\030external_api,update_mas" + + "k\202\323\344\223\002M2=/v1/{external_api.name=projects" + + "/*/locations/*/externalApis/*}:\014external_api\022\236\001\n" + + "\021DeleteExternalApi\0220.google.cloud.apihub.v1.DeleteExternalApiRequest\032\026.g" + + "oogle.protobuf.Empty\"?\332A\004name\202\323\344\223\0022*0/v1" + + "/{name=projects/*/locations/*/externalApis/*}\022\270\001\n" + + "\020ListExternalApis\022/.google.cloud.apihub.v1.ListExternalApisRequest\0320.go" + + "ogle.cloud.apihub.v1.ListExternalApisRes" + + "ponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{parent=proj" + + "ects/*/locations/*}/externalApis\032I\312A\025api" + + "hub.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform2\204\010\n" + "\022ApiHubDependencies\022\317\001\n" - + "\020CreateDependency\022/.google.cloud.apihub.v1.CreateDependencyRequest\032\".googl" - + "e.cloud.apihub.v1.Dependency\"f\332A\037parent," - + "dependency,dependency_id\202\323\344\223\002>\"0/v1/{par" - + "ent=projects/*/locations/*}/dependencies:\n" + + "\020CreateDependency\022/.google.cloud.apihub.v1.CreateDependencyRequest" + + "\032\".google.cloud.apihub.v1.Dependency\"f\332A" + + "\037parent,dependency,dependency_id\202\323\344\223\002>\"0" + + "/v1/{parent=projects/*/locations/*}/dependencies:\n" + "dependency\022\242\001\n\r" - + "GetDependency\022,.google.cloud.apihub.v1.GetDependencyRequest\032\".g" - + "oogle.cloud.apihub.v1.Dependency\"?\332A\004nam" - + "e\202\323\344\223\0022\0220/v1/{name=projects/*/locations/*/dependencies/*}\022\321\001\n" - + "\020UpdateDependency\022/.google.cloud.apihub.v1.UpdateDependency" - + "Request\032\".google.cloud.apihub.v1.Depende" - + "ncy\"h\332A\026dependency,update_mask\202\323\344\223\002I2;/v" - + "1/{dependency.name=projects/*/locations/*/dependencies/*}:\n" + + "GetDependency\022,.google.cloud.apihub.v1.GetDependencyReq" + + "uest\032\".google.cloud.apihub.v1.Dependency" + + "\"?\332A\004name\202\323\344\223\0022\0220/v1/{name=projects/*/locations/*/dependencies/*}\022\321\001\n" + + "\020UpdateDependency\022/.google.cloud.apihub.v1.UpdateDe" + + "pendencyRequest\032\".google.cloud.apihub.v1" + + ".Dependency\"h\332A\026dependency,update_mask\202\323" + + "\344\223\002I2;/v1/{dependency.name=projects/*/locations/*/dependencies/*}:\n" + "dependency\022\234\001\n" - + "\020DeleteDependency\022/.google.cloud.apihub.v1.Dele" - + "teDependencyRequest\032\026.google.protobuf.Em" - + "pty\"?\332A\004name\202\323\344\223\0022*0/v1/{name=projects/*/locations/*/dependencies/*}\022\270\001\n" - + "\020ListDependencies\022/.google.cloud.apihub.v1.ListD" - + "ependenciesRequest\0320.google.cloud.apihub" - + ".v1.ListDependenciesResponse\"A\332A\006parent\202" - + "\323\344\223\0022\0220/v1/{parent=projects/*/locations/" - + "*}/dependencies\032I\312A\025apihub.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/cloud-platformB\264\001\n" - + "\032com.google.cloud.apihub.v1B\022ApiHubServiceProtoP\001Z2cloud.google.co" - + "m/go/apihub/apiv1/apihubpb;apihubpb\252\002\026Go" - + "ogle.Cloud.ApiHub.V1\312\002\026Google\\Cloud\\ApiH" - + "ub\\V1\352\002\031Google::Cloud::ApiHub::V1b\006proto3" + + "\020DeleteDependency\022/.google.cloud.apihub" + + ".v1.DeleteDependencyRequest\032\026.google.pro" + + "tobuf.Empty\"?\332A\004name\202\323\344\223\0022*0/v1/{name=projects/*/locations/*/dependencies/*}\022\270\001\n" + + "\020ListDependencies\022/.google.cloud.apihub." + + "v1.ListDependenciesRequest\0320.google.clou" + + "d.apihub.v1.ListDependenciesResponse\"A\332A" + + "\006parent\202\323\344\223\0022\0220/v1/{parent=projects/*/lo" + + "cations/*}/dependencies\032I\312A\025apihub.googl" + + "eapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\264\001\n" + + "\032com.google.cloud.apihub.v1B\022ApiHubServiceProtoP\001Z2cloud.g" + + "oogle.com/go/apihub/apiv1/apihubpb;apihu" + + "bpb\252\002\026Google.Cloud.ApiHub.V1\312\002\026Google\\Cl" + + "oud\\ApiHub\\V1\352\002\031Google::Cloud::ApiHub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -771,16 +809,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_apihub_v1_GetApiOperationRequest_descriptor = + internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor, + new java.lang.String[] { + "Parent", "ApiOperationId", "ApiOperation", + }); + internal_static_google_cloud_apihub_v1_GetApiOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_apihub_v1_GetApiOperationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetApiOperationRequest_descriptor, new java.lang.String[] { "Name", }); + internal_static_google_cloud_apihub_v1_UpdateApiOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_apihub_v1_UpdateApiOperationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_UpdateApiOperationRequest_descriptor, + new java.lang.String[] { + "ApiOperation", "UpdateMask", + }); + internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_apihub_v1_ListApiOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_apihub_v1_ListApiOperationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListApiOperationsRequest_descriptor, @@ -788,7 +850,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ListApiOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_apihub_v1_ListApiOperationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListApiOperationsResponse_descriptor, @@ -796,7 +858,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApiOperations", "NextPageToken", }); internal_static_google_cloud_apihub_v1_GetDefinitionRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_apihub_v1_GetDefinitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetDefinitionRequest_descriptor, @@ -804,7 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_CreateDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_apihub_v1_CreateDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_CreateDeploymentRequest_descriptor, @@ -812,7 +874,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DeploymentId", "Deployment", }); internal_static_google_cloud_apihub_v1_GetDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_apihub_v1_GetDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetDeploymentRequest_descriptor, @@ -820,7 +882,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_UpdateDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_apihub_v1_UpdateDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_UpdateDeploymentRequest_descriptor, @@ -828,7 +890,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Deployment", "UpdateMask", }); internal_static_google_cloud_apihub_v1_DeleteDeploymentRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_apihub_v1_DeleteDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_DeleteDeploymentRequest_descriptor, @@ -836,7 +898,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_ListDeploymentsRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_apihub_v1_ListDeploymentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListDeploymentsRequest_descriptor, @@ -844,7 +906,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ListDeploymentsResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_apihub_v1_ListDeploymentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListDeploymentsResponse_descriptor, @@ -852,7 +914,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Deployments", "NextPageToken", }); internal_static_google_cloud_apihub_v1_CreateAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_apihub_v1_CreateAttributeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_CreateAttributeRequest_descriptor, @@ -860,7 +922,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "AttributeId", "Attribute", }); internal_static_google_cloud_apihub_v1_GetAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_apihub_v1_GetAttributeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetAttributeRequest_descriptor, @@ -868,7 +930,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_UpdateAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_apihub_v1_UpdateAttributeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_UpdateAttributeRequest_descriptor, @@ -876,7 +938,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Attribute", "UpdateMask", }); internal_static_google_cloud_apihub_v1_DeleteAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_apihub_v1_DeleteAttributeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_DeleteAttributeRequest_descriptor, @@ -884,7 +946,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_ListAttributesRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_apihub_v1_ListAttributesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListAttributesRequest_descriptor, @@ -892,7 +954,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ListAttributesResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_apihub_v1_ListAttributesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListAttributesResponse_descriptor, @@ -900,7 +962,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Attributes", "NextPageToken", }); internal_static_google_cloud_apihub_v1_SearchResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_apihub_v1_SearchResourcesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_SearchResourcesRequest_descriptor, @@ -908,7 +970,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "Query", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ApiHubResource_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_apihub_v1_ApiHubResource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ApiHubResource_descriptor, @@ -916,7 +978,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Api", "Operation", "Deployment", "Spec", "Definition", "Version", "Resource", }); internal_static_google_cloud_apihub_v1_SearchResult_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_apihub_v1_SearchResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_SearchResult_descriptor, @@ -924,7 +986,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Resource", }); internal_static_google_cloud_apihub_v1_SearchResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_apihub_v1_SearchResourcesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_SearchResourcesResponse_descriptor, @@ -932,7 +994,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SearchResults", "NextPageToken", }); internal_static_google_cloud_apihub_v1_CreateDependencyRequest_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_apihub_v1_CreateDependencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_CreateDependencyRequest_descriptor, @@ -940,7 +1002,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DependencyId", "Dependency", }); internal_static_google_cloud_apihub_v1_GetDependencyRequest_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_apihub_v1_GetDependencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetDependencyRequest_descriptor, @@ -948,7 +1010,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_UpdateDependencyRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_apihub_v1_UpdateDependencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_UpdateDependencyRequest_descriptor, @@ -956,7 +1018,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dependency", "UpdateMask", }); internal_static_google_cloud_apihub_v1_DeleteDependencyRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_apihub_v1_DeleteDependencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_DeleteDependencyRequest_descriptor, @@ -964,7 +1026,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_ListDependenciesRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_apihub_v1_ListDependenciesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListDependenciesRequest_descriptor, @@ -972,7 +1034,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ListDependenciesResponse_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_apihub_v1_ListDependenciesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListDependenciesResponse_descriptor, @@ -980,7 +1042,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dependencies", "NextPageToken", }); internal_static_google_cloud_apihub_v1_CreateExternalApiRequest_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_apihub_v1_CreateExternalApiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_CreateExternalApiRequest_descriptor, @@ -988,7 +1050,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ExternalApiId", "ExternalApi", }); internal_static_google_cloud_apihub_v1_GetExternalApiRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_apihub_v1_GetExternalApiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_GetExternalApiRequest_descriptor, @@ -996,7 +1058,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_UpdateExternalApiRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_apihub_v1_UpdateExternalApiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_UpdateExternalApiRequest_descriptor, @@ -1004,7 +1066,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExternalApi", "UpdateMask", }); internal_static_google_cloud_apihub_v1_DeleteExternalApiRequest_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(51); internal_static_google_cloud_apihub_v1_DeleteExternalApiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_DeleteExternalApiRequest_descriptor, @@ -1012,7 +1074,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_apihub_v1_ListExternalApisRequest_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(52); internal_static_google_cloud_apihub_v1_ListExternalApisRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListExternalApisRequest_descriptor, @@ -1020,7 +1082,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_apihub_v1_ListExternalApisResponse_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(53); internal_static_google_cloud_apihub_v1_ListExternalApisResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ListExternalApisResponse_descriptor, diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataList.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataList.java new file mode 100644 index 000000000000..f283a74eaa64 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataList.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The message to hold repeated API metadata.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApiMetadataList} + */ +public final class ApiMetadataList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ApiMetadataList) + ApiMetadataListOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ApiMetadataList.newBuilder() to construct. + private ApiMetadataList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiMetadataList() { + apiMetadata_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiMetadataList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiMetadataList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApiMetadataList.class, + com.google.cloud.apihub.v1.ApiMetadataList.Builder.class); + } + + public static final int API_METADATA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List apiMetadata_; + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getApiMetadataList() { + return apiMetadata_; + } + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getApiMetadataOrBuilderList() { + return apiMetadata_; + } + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getApiMetadataCount() { + return apiMetadata_.size(); + } + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.APIMetadata getApiMetadata(int index) { + return apiMetadata_.get(index); + } + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.APIMetadataOrBuilder getApiMetadataOrBuilder(int index) { + return apiMetadata_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < apiMetadata_.size(); i++) { + output.writeMessage(1, apiMetadata_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < apiMetadata_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, apiMetadata_.get(i)); + } + 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.apihub.v1.ApiMetadataList)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ApiMetadataList other = + (com.google.cloud.apihub.v1.ApiMetadataList) obj; + + if (!getApiMetadataList().equals(other.getApiMetadataList())) 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 (getApiMetadataCount() > 0) { + hash = (37 * hash) + API_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getApiMetadataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList 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.apihub.v1.ApiMetadataList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom( + 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.apihub.v1.ApiMetadataList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom( + java.io.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.apihub.v1.ApiMetadataList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseDelimitedFrom( + java.io.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.apihub.v1.ApiMetadataList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ApiMetadataList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The message to hold repeated API metadata.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApiMetadataList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ApiMetadataList) + com.google.cloud.apihub.v1.ApiMetadataListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiMetadataList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApiMetadataList.class, + com.google.cloud.apihub.v1.ApiMetadataList.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ApiMetadataList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (apiMetadataBuilder_ == null) { + apiMetadata_ = java.util.Collections.emptyList(); + } else { + apiMetadata_ = null; + apiMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataList getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataList build() { + com.google.cloud.apihub.v1.ApiMetadataList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApiMetadataList buildPartial() { + com.google.cloud.apihub.v1.ApiMetadataList result = + new com.google.cloud.apihub.v1.ApiMetadataList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.ApiMetadataList result) { + if (apiMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + apiMetadata_ = java.util.Collections.unmodifiableList(apiMetadata_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.apiMetadata_ = apiMetadata_; + } else { + result.apiMetadata_ = apiMetadataBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.apihub.v1.ApiMetadataList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ApiMetadataList) { + return mergeFrom((com.google.cloud.apihub.v1.ApiMetadataList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ApiMetadataList other) { + if (other == com.google.cloud.apihub.v1.ApiMetadataList.getDefaultInstance()) return this; + if (apiMetadataBuilder_ == null) { + if (!other.apiMetadata_.isEmpty()) { + if (apiMetadata_.isEmpty()) { + apiMetadata_ = other.apiMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApiMetadataIsMutable(); + apiMetadata_.addAll(other.apiMetadata_); + } + onChanged(); + } + } else { + if (!other.apiMetadata_.isEmpty()) { + if (apiMetadataBuilder_.isEmpty()) { + apiMetadataBuilder_.dispose(); + apiMetadataBuilder_ = null; + apiMetadata_ = other.apiMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + apiMetadataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getApiMetadataFieldBuilder() + : null; + } else { + apiMetadataBuilder_.addAllMessages(other.apiMetadata_); + } + } + } + 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.apihub.v1.APIMetadata m = + input.readMessage( + com.google.cloud.apihub.v1.APIMetadata.parser(), extensionRegistry); + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + apiMetadata_.add(m); + } else { + apiMetadataBuilder_.addMessage(m); + } + 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 int bitField0_; + + private java.util.List apiMetadata_ = + java.util.Collections.emptyList(); + + private void ensureApiMetadataIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + apiMetadata_ = + new java.util.ArrayList(apiMetadata_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.APIMetadata, + com.google.cloud.apihub.v1.APIMetadata.Builder, + com.google.cloud.apihub.v1.APIMetadataOrBuilder> + apiMetadataBuilder_; + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getApiMetadataList() { + if (apiMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(apiMetadata_); + } else { + return apiMetadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getApiMetadataCount() { + if (apiMetadataBuilder_ == null) { + return apiMetadata_.size(); + } else { + return apiMetadataBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.APIMetadata getApiMetadata(int index) { + if (apiMetadataBuilder_ == null) { + return apiMetadata_.get(index); + } else { + return apiMetadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiMetadata(int index, com.google.cloud.apihub.v1.APIMetadata value) { + if (apiMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiMetadataIsMutable(); + apiMetadata_.set(index, value); + onChanged(); + } else { + apiMetadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiMetadata( + int index, com.google.cloud.apihub.v1.APIMetadata.Builder builderForValue) { + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + apiMetadata_.set(index, builderForValue.build()); + onChanged(); + } else { + apiMetadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApiMetadata(com.google.cloud.apihub.v1.APIMetadata value) { + if (apiMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiMetadataIsMutable(); + apiMetadata_.add(value); + onChanged(); + } else { + apiMetadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApiMetadata(int index, com.google.cloud.apihub.v1.APIMetadata value) { + if (apiMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApiMetadataIsMutable(); + apiMetadata_.add(index, value); + onChanged(); + } else { + apiMetadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApiMetadata(com.google.cloud.apihub.v1.APIMetadata.Builder builderForValue) { + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + apiMetadata_.add(builderForValue.build()); + onChanged(); + } else { + apiMetadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApiMetadata( + int index, com.google.cloud.apihub.v1.APIMetadata.Builder builderForValue) { + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + apiMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + apiMetadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllApiMetadata( + java.lang.Iterable values) { + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, apiMetadata_); + onChanged(); + } else { + apiMetadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApiMetadata() { + if (apiMetadataBuilder_ == null) { + apiMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + apiMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeApiMetadata(int index) { + if (apiMetadataBuilder_ == null) { + ensureApiMetadataIsMutable(); + apiMetadata_.remove(index); + onChanged(); + } else { + apiMetadataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.APIMetadata.Builder getApiMetadataBuilder(int index) { + return getApiMetadataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.APIMetadataOrBuilder getApiMetadataOrBuilder(int index) { + if (apiMetadataBuilder_ == null) { + return apiMetadata_.get(index); + } else { + return apiMetadataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getApiMetadataOrBuilderList() { + if (apiMetadataBuilder_ != null) { + return apiMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apiMetadata_); + } + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.APIMetadata.Builder addApiMetadataBuilder() { + return getApiMetadataFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.APIMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.APIMetadata.Builder addApiMetadataBuilder(int index) { + return getApiMetadataFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.APIMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Required. The list of API metadata.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getApiMetadataBuilderList() { + return getApiMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.APIMetadata, + com.google.cloud.apihub.v1.APIMetadata.Builder, + com.google.cloud.apihub.v1.APIMetadataOrBuilder> + getApiMetadataFieldBuilder() { + if (apiMetadataBuilder_ == null) { + apiMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.APIMetadata, + com.google.cloud.apihub.v1.APIMetadata.Builder, + com.google.cloud.apihub.v1.APIMetadataOrBuilder>( + apiMetadata_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + apiMetadata_ = null; + } + return apiMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.ApiMetadataList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ApiMetadataList) + private static final com.google.cloud.apihub.v1.ApiMetadataList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ApiMetadataList(); + } + + public static com.google.cloud.apihub.v1.ApiMetadataList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiMetadataList 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.apihub.v1.ApiMetadataList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataListOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataListOrBuilder.java new file mode 100644 index 000000000000..f0245a18ebf9 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiMetadataListOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ApiMetadataListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ApiMetadataList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getApiMetadataList(); + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.APIMetadata getApiMetadata(int index); + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getApiMetadataCount(); + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getApiMetadataOrBuilderList(); + + /** + * + * + *
    +   * Required. The list of API metadata.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.APIMetadata api_metadata = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.APIMetadataOrBuilder getApiMetadataOrBuilder(int index); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperation.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperation.java index 20f588a61f27..37779d16cfa2 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperation.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperation.java @@ -28,6 +28,10 @@ * added or an existing spec is updated/deleted in a version. * Currently, an operation will be created only corresponding to OpenAPI spec as * parsing is supported for OpenAPI spec. + * Alternatively operations can be managed via create,update and delete APIs, + * creation of apiOperation can be possible only for version with no parsed + * operations and update/delete can be possible only for operations created via + * create API. * * * Protobuf type {@code google.cloud.apihub.v1.ApiOperation} @@ -46,6 +50,7 @@ private ApiOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) private ApiOperation() { name_ = ""; spec_ = ""; + sourceMetadata_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -150,9 +155,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
    -   * Output only. The name of the spec from where the operation was parsed.
    -   * Format is
    +   * Output only. The name of the spec will be of the format:
        * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +   * Note:The name of the spec will be empty if the operation is created via
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
        * 
    * * @@ -178,9 +184,10 @@ public java.lang.String getSpec() { * * *
    -   * Output only. The name of the spec from where the operation was parsed.
    -   * Format is
    +   * Output only. The name of the spec will be of the format:
        * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +   * Note:The name of the spec will be empty if the operation is created via
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
        * 
    * * @@ -209,11 +216,14 @@ public com.google.protobuf.ByteString getSpecBytes() { * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the details field is set. @@ -227,11 +237,14 @@ public boolean hasDetails() { * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The details. @@ -247,11 +260,14 @@ public com.google.cloud.apihub.v1.OperationDetails getDetails() { * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -501,6 +517,97 @@ public com.google.cloud.apihub.v1.AttributeValues getAttributesOrThrow(java.lang return map.get(key); } + public static final int SOURCE_METADATA_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List sourceMetadata_; + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSourceMetadataList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSourceMetadataOrBuilderList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSourceMetadataCount() { + return sourceMetadata_.size(); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + return sourceMetadata_.get(index); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index) { + return sourceMetadata_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -532,6 +639,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 6); + for (int i = 0; i < sourceMetadata_.size(); i++) { + output.writeMessage(7, sourceMetadata_.get(i)); + } getUnknownFields().writeTo(output); } @@ -567,6 +677,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, attributes__); } + for (int i = 0; i < sourceMetadata_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, sourceMetadata_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -597,6 +710,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (!getSourceMetadataList().equals(other.getSourceMetadataList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -628,6 +742,10 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } + if (getSourceMetadataCount() > 0) { + hash = (37 * hash) + SOURCE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getSourceMetadataList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -738,6 +856,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * added or an existing spec is updated/deleted in a version. * Currently, an operation will be created only corresponding to OpenAPI spec as * parsing is supported for OpenAPI spec. + * Alternatively operations can be managed via create,update and delete APIs, + * creation of apiOperation can be possible only for version with no parsed + * operations and update/delete can be possible only for operations created via + * create API. * * * Protobuf type {@code google.cloud.apihub.v1.ApiOperation} @@ -798,6 +920,7 @@ private void maybeForceBuilderInitialization() { getDetailsFieldBuilder(); getCreateTimeFieldBuilder(); getUpdateTimeFieldBuilder(); + getSourceMetadataFieldBuilder(); } } @@ -823,6 +946,13 @@ public Builder clear() { updateTimeBuilder_ = null; } internalGetMutableAttributes().clear(); + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + } else { + sourceMetadata_ = null; + sourceMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -850,6 +980,7 @@ public com.google.cloud.apihub.v1.ApiOperation build() { public com.google.cloud.apihub.v1.ApiOperation buildPartial() { com.google.cloud.apihub.v1.ApiOperation result = new com.google.cloud.apihub.v1.ApiOperation(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -857,6 +988,18 @@ public com.google.cloud.apihub.v1.ApiOperation buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.ApiOperation result) { + if (sourceMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + sourceMetadata_ = java.util.Collections.unmodifiableList(sourceMetadata_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.sourceMetadata_ = sourceMetadata_; + } else { + result.sourceMetadata_ = sourceMetadataBuilder_.build(); + } + } + private void buildPartial0(com.google.cloud.apihub.v1.ApiOperation result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -951,6 +1094,33 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.ApiOperation other) { } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); bitField0_ |= 0x00000020; + if (sourceMetadataBuilder_ == null) { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadata_.isEmpty()) { + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureSourceMetadataIsMutable(); + sourceMetadata_.addAll(other.sourceMetadata_); + } + onChanged(); + } + } else { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadataBuilder_.isEmpty()) { + sourceMetadataBuilder_.dispose(); + sourceMetadataBuilder_ = null; + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00000040); + sourceMetadataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourceMetadataFieldBuilder() + : null; + } else { + sourceMetadataBuilder_.addAllMessages(other.sourceMetadata_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1021,6 +1191,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 50 + case 58: + { + com.google.cloud.apihub.v1.SourceMetadata m = + input.readMessage( + com.google.cloud.apihub.v1.SourceMetadata.parser(), extensionRegistry); + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(m); + } else { + sourceMetadataBuilder_.addMessage(m); + } + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1172,9 +1355,10 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
    -     * Output only. The name of the spec from where the operation was parsed.
    -     * Format is
    +     * Output only. The name of the spec will be of the format:
          * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +     * Note:The name of the spec will be empty if the operation is created via
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
          * 
    * * @@ -1199,9 +1383,10 @@ public java.lang.String getSpec() { * * *
    -     * Output only. The name of the spec from where the operation was parsed.
    -     * Format is
    +     * Output only. The name of the spec will be of the format:
          * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +     * Note:The name of the spec will be empty if the operation is created via
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
          * 
    * * @@ -1226,9 +1411,10 @@ public com.google.protobuf.ByteString getSpecBytes() { * * *
    -     * Output only. The name of the spec from where the operation was parsed.
    -     * Format is
    +     * Output only. The name of the spec will be of the format:
          * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +     * Note:The name of the spec will be empty if the operation is created via
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
          * 
    * * @@ -1252,9 +1438,10 @@ public Builder setSpec(java.lang.String value) { * * *
    -     * Output only. The name of the spec from where the operation was parsed.
    -     * Format is
    +     * Output only. The name of the spec will be of the format:
          * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +     * Note:The name of the spec will be empty if the operation is created via
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
          * 
    * * @@ -1274,9 +1461,10 @@ public Builder clearSpec() { * * *
    -     * Output only. The name of the spec from where the operation was parsed.
    -     * Format is
    +     * Output only. The name of the spec will be of the format:
          * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +     * Note:The name of the spec will be empty if the operation is created via
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
          * 
    * * @@ -1308,11 +1496,14 @@ public Builder setSpecBytes(com.google.protobuf.ByteString value) { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the details field is set. @@ -1325,11 +1516,14 @@ public boolean hasDetails() { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The details. @@ -1348,11 +1542,14 @@ public com.google.cloud.apihub.v1.OperationDetails getDetails() { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setDetails(com.google.cloud.apihub.v1.OperationDetails value) { @@ -1373,11 +1570,14 @@ public Builder setDetails(com.google.cloud.apihub.v1.OperationDetails value) { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setDetails(com.google.cloud.apihub.v1.OperationDetails.Builder builderForValue) { @@ -1395,11 +1595,14 @@ public Builder setDetails(com.google.cloud.apihub.v1.OperationDetails.Builder bu * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeDetails(com.google.cloud.apihub.v1.OperationDetails value) { @@ -1425,11 +1628,14 @@ public Builder mergeDetails(com.google.cloud.apihub.v1.OperationDetails value) { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearDetails() { @@ -1447,11 +1653,14 @@ public Builder clearDetails() { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.apihub.v1.OperationDetails.Builder getDetailsBuilder() { @@ -1464,11 +1673,14 @@ public com.google.cloud.apihub.v1.OperationDetails.Builder getDetailsBuilder() { * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.apihub.v1.OperationDetailsOrBuilder getDetailsOrBuilder() { @@ -1485,11 +1697,14 @@ public com.google.cloud.apihub.v1.OperationDetailsOrBuilder getDetailsOrBuilder( * * *
    -     * Output only. Operation details.
    +     * Optional. Operation details.
    +     * Note: Even though this field is optional, it is required for
    +     * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +     * API and we will fail the request if not provided.
          * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2219,6 +2434,432 @@ public com.google.cloud.apihub.v1.AttributeValues.Builder putAttributesBuilderIf return (com.google.cloud.apihub.v1.AttributeValues.Builder) entry; } + private java.util.List sourceMetadata_ = + java.util.Collections.emptyList(); + + private void ensureSourceMetadataIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + sourceMetadata_ = + new java.util.ArrayList(sourceMetadata_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + sourceMetadataBuilder_; + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSourceMetadataList() { + if (sourceMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } else { + return sourceMetadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSourceMetadataCount() { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.size(); + } else { + return sourceMetadataBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSourceMetadata( + java.lang.Iterable values) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceMetadata_); + onChanged(); + } else { + sourceMetadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSourceMetadata() { + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + sourceMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.remove(index); + onChanged(); + } else { + sourceMetadataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder getSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder( + int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataOrBuilderList() { + if (sourceMetadataBuilder_ != null) { + return sourceMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder() { + return getSourceMetadataFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the API
    +     * operation.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataBuilderList() { + return getSourceMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + getSourceMetadataFieldBuilder() { + if (sourceMetadataBuilder_ == null) { + sourceMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder>( + sourceMetadata_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + sourceMetadata_ = null; + } + return sourceMetadataBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperationOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperationOrBuilder.java index 9e70277a1fd5..5b29d7006f4b 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperationOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOperationOrBuilder.java @@ -60,9 +60,10 @@ public interface ApiOperationOrBuilder * * *
    -   * Output only. The name of the spec from where the operation was parsed.
    -   * Format is
    +   * Output only. The name of the spec will be of the format:
        * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +   * Note:The name of the spec will be empty if the operation is created via
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
        * 
    * * @@ -77,9 +78,10 @@ public interface ApiOperationOrBuilder * * *
    -   * Output only. The name of the spec from where the operation was parsed.
    -   * Format is
    +   * Output only. The name of the spec will be of the format:
        * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
    +   * Note:The name of the spec will be empty if the operation is created via
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API.
        * 
    * * @@ -94,11 +96,14 @@ public interface ApiOperationOrBuilder * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the details field is set. @@ -109,11 +114,14 @@ public interface ApiOperationOrBuilder * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The details. @@ -124,11 +132,14 @@ public interface ApiOperationOrBuilder * * *
    -   * Output only. Operation details.
    +   * Optional. Operation details.
    +   * Note: Even though this field is optional, it is required for
    +   * [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * API and we will fail the request if not provided.
        * 
    * * - * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.apihub.v1.OperationDetails details = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.apihub.v1.OperationDetailsOrBuilder getDetailsOrBuilder(); @@ -300,4 +311,75 @@ com.google.cloud.apihub.v1.AttributeValues getAttributesOrDefault( *
    */ com.google.cloud.apihub.v1.AttributeValues getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSourceMetadataList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSourceMetadataCount(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSourceMetadataOrBuilderList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * operation.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index); } diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOrBuilder.java index 3176dc8b4ebd..60c00cdb7c9a 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApiOrBuilder.java @@ -785,4 +785,284 @@ com.google.cloud.apihub.v1.AttributeValues getAttributesOrDefault( * @return The bytes for selectedVersion. */ com.google.protobuf.ByteString getSelectedVersionBytes(); + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiRequirements field is set. + */ + boolean hasApiRequirements(); + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiRequirements. + */ + com.google.cloud.apihub.v1.AttributeValues getApiRequirements(); + + /** + * + * + *
    +   * Optional. The api requirement doc associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_requirements = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.AttributeValuesOrBuilder getApiRequirementsOrBuilder(); + + /** + * + * + *
    +   * Optional. Fingerprint of the API resource.
    +   * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fingerprint. + */ + java.lang.String getFingerprint(); + + /** + * + * + *
    +   * Optional. Fingerprint of the API resource.
    +   * 
    + * + * string fingerprint = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fingerprint. + */ + com.google.protobuf.ByteString getFingerprintBytes(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSourceMetadataList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSourceMetadataCount(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSourceMetadataOrBuilderList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the API
    +   * resource.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index); + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiFunctionalRequirements field is set. + */ + boolean hasApiFunctionalRequirements(); + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiFunctionalRequirements. + */ + com.google.cloud.apihub.v1.AttributeValues getApiFunctionalRequirements(); + + /** + * + * + *
    +   * Optional. The api functional requirements associated with the API resource.
    +   * Carinality is 1 for this attribute.
    +   * This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-functional-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_functional_requirements = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.AttributeValuesOrBuilder getApiFunctionalRequirementsOrBuilder(); + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiTechnicalRequirements field is set. + */ + boolean hasApiTechnicalRequirements(); + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiTechnicalRequirements. + */ + com.google.cloud.apihub.v1.AttributeValues getApiTechnicalRequirements(); + + /** + * + * + *
    +   * Optional. The api technical requirements associated with the API resource.
    +   * Carinality is 1 for this attribute. This maps to the following system
    +   * defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-api-technical-requirements`
    +   * attribute. The value of the attribute should be a proper URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues api_technical_requirements = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.AttributeValuesOrBuilder getApiTechnicalRequirementsOrBuilder(); } diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetails.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetails.java new file mode 100644 index 000000000000..eb1ca2c14000 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetails.java @@ -0,0 +1,863 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The details of the Application Integration endpoint to be triggered for
    + * curation.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails} + */ +public final class ApplicationIntegrationEndpointDetails + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) + ApplicationIntegrationEndpointDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ApplicationIntegrationEndpointDetails.newBuilder() to construct. + private ApplicationIntegrationEndpointDetails( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationIntegrationEndpointDetails() { + uri_ = ""; + triggerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationIntegrationEndpointDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.class, + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
    +   * Required. The endpoint URI should be a valid REST URI for triggering an
    +   * Application Integration. Format:
    +   * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * or
    +   * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The endpoint URI should be a valid REST URI for triggering an
    +   * Application Integration. Format:
    +   * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * or
    +   * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIGGER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object triggerId_ = ""; + + /** + * + * + *
    +   * Required. The API trigger ID of the Application Integration workflow.
    +   * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The triggerId. + */ + @java.lang.Override + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The API trigger ID of the Application Integration workflow.
    +   * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for triggerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, triggerId_); + } + 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(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, triggerId_); + } + 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.apihub.v1.ApplicationIntegrationEndpointDetails)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails other = + (com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getTriggerId().equals(other.getTriggerId())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; + hash = (53 * hash) + getTriggerId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails 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.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + 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.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + java.io.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.apihub.v1.ApplicationIntegrationEndpointDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseDelimitedFrom( + java.io.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.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ApplicationIntegrationEndpointDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The details of the Application Integration endpoint to be triggered for
    +   * curation.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.class, + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + triggerId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails build() { + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails buildPartial() { + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails result = + new com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.triggerId_ = triggerId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ApplicationIntegrationEndpointDetails) { + return mergeFrom((com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails other) { + if (other + == com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTriggerId().isEmpty()) { + triggerId_ = other.triggerId_; + bitField0_ |= 0x00000002; + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + triggerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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.lang.Object uri_ = ""; + + /** + * + * + *
    +     * Required. The endpoint URI should be a valid REST URI for triggering an
    +     * Application Integration. Format:
    +     * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * or
    +     * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The endpoint URI should be a valid REST URI for triggering an
    +     * Application Integration. Format:
    +     * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * or
    +     * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The endpoint URI should be a valid REST URI for triggering an
    +     * Application Integration. Format:
    +     * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * or
    +     * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The endpoint URI should be a valid REST URI for triggering an
    +     * Application Integration. Format:
    +     * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * or
    +     * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The endpoint URI should be a valid REST URI for triggering an
    +     * Application Integration. Format:
    +     * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * or
    +     * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +     * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object triggerId_ = ""; + + /** + * + * + *
    +     * Required. The API trigger ID of the Application Integration workflow.
    +     * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The triggerId. + */ + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The API trigger ID of the Application Integration workflow.
    +     * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for triggerId. + */ + public com.google.protobuf.ByteString getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The API trigger ID of the Application Integration workflow.
    +     * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + triggerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API trigger ID of the Application Integration workflow.
    +     * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTriggerId() { + triggerId_ = getDefaultInstance().getTriggerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API trigger ID of the Application Integration workflow.
    +     * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + triggerId_ = value; + bitField0_ |= 0x00000002; + 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.apihub.v1.ApplicationIntegrationEndpointDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) + private static final com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails(); + } + + public static com.google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationIntegrationEndpointDetails 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.apihub.v1.ApplicationIntegrationEndpointDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetailsOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetailsOrBuilder.java new file mode 100644 index 000000000000..0f42555e4ac1 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ApplicationIntegrationEndpointDetailsOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ApplicationIntegrationEndpointDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ApplicationIntegrationEndpointDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The endpoint URI should be a valid REST URI for triggering an
    +   * Application Integration. Format:
    +   * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * or
    +   * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
    +   * Required. The endpoint URI should be a valid REST URI for triggering an
    +   * Application Integration. Format:
    +   * `https://integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * or
    +   * `https://{location}-integrations.googleapis.com/v1/{name=projects/*/locations/*/integrations/*}:execute`
    +   * 
    + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
    +   * Required. The API trigger ID of the Application Integration workflow.
    +   * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The triggerId. + */ + java.lang.String getTriggerId(); + + /** + * + * + *
    +   * Required. The API trigger ID of the Application Integration workflow.
    +   * 
    + * + * string trigger_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for triggerId. + */ + com.google.protobuf.ByteString getTriggerIdBytes(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Attribute.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Attribute.java index 0155a3982881..3e6af596c49f 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Attribute.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Attribute.java @@ -605,6 +605,16 @@ public enum DataType implements com.google.protobuf.ProtocolMessageEnum { * STRING = 3; */ STRING(3), + /** + * + * + *
    +     * Attribute's value is of type uri.
    +     * 
    + * + * URI = 4; + */ + URI(4), UNRECOGNIZED(-1), ; @@ -652,6 +662,17 @@ public enum DataType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int STRING_VALUE = 3; + /** + * + * + *
    +     * Attribute's value is of type uri.
    +     * 
    + * + * URI = 4; + */ + public static final int URI_VALUE = 4; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -684,6 +705,8 @@ public static DataType forNumber(int value) { return JSON; case 3: return STRING; + case 4: + return URI; default: return null; } diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValues.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValues.java index 53b831891ae4..a3c669066af9 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValues.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValues.java @@ -1964,6 +1964,7 @@ public enum ValueCase ENUM_VALUES(2), STRING_VALUES(3), JSON_VALUES(4), + URI_VALUES(5), VALUE_NOT_SET(0); private final int value; @@ -1989,6 +1990,8 @@ public static ValueCase forNumber(int value) { return STRING_VALUES; case 4: return JSON_VALUES; + case 5: + return URI_VALUES; case 0: return VALUE_NOT_SET; default: @@ -2179,6 +2182,64 @@ public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues getJsonV return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.getDefaultInstance(); } + public static final int URI_VALUES_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return Whether the uriValues field is set. + */ + @java.lang.Override + public boolean hasUriValues() { + return valueCase_ == 5; + } + + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return The uriValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues getUriValues() { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_; + } + return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.getDefaultInstance(); + } + + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder + getUriValuesOrBuilder() { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_; + } + return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.getDefaultInstance(); + } + public static final int ATTRIBUTE_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -2267,6 +2328,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 4, (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_); } + if (valueCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_); + } getUnknownFields().writeTo(output); } @@ -2294,6 +2359,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_); } + if (valueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2322,6 +2392,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getJsonValues().equals(other.getJsonValues())) return false; break; + case 5: + if (!getUriValues().equals(other.getUriValues())) return false; + break; case 0: default: } @@ -2351,6 +2424,10 @@ public int hashCode() { hash = (37 * hash) + JSON_VALUES_FIELD_NUMBER; hash = (53 * hash) + getJsonValues().hashCode(); break; + case 5: + hash = (37 * hash) + URI_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getUriValues().hashCode(); + break; case 0: default: } @@ -2503,6 +2580,9 @@ public Builder clear() { if (jsonValuesBuilder_ != null) { jsonValuesBuilder_.clear(); } + if (uriValuesBuilder_ != null) { + uriValuesBuilder_.clear(); + } attribute_ = ""; valueCase_ = 0; value_ = null; @@ -2543,7 +2623,7 @@ public com.google.cloud.apihub.v1.AttributeValues buildPartial() { private void buildPartial0(com.google.cloud.apihub.v1.AttributeValues result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.attribute_ = attribute_; } } @@ -2560,6 +2640,9 @@ private void buildPartialOneofs(com.google.cloud.apihub.v1.AttributeValues resul if (valueCase_ == 4 && jsonValuesBuilder_ != null) { result.value_ = jsonValuesBuilder_.build(); } + if (valueCase_ == 5 && uriValuesBuilder_ != null) { + result.value_ = uriValuesBuilder_.build(); + } } @java.lang.Override @@ -2609,7 +2692,7 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.AttributeValues other) { if (other == com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) return this; if (!other.getAttribute().isEmpty()) { attribute_ = other.attribute_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } switch (other.getValueCase()) { @@ -2628,6 +2711,11 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.AttributeValues other) { mergeJsonValues(other.getJsonValues()); break; } + case URI_VALUES: + { + mergeUriValues(other.getUriValues()); + break; + } case VALUE_NOT_SET: { break; @@ -2662,7 +2750,7 @@ public Builder mergeFrom( case 10: { attribute_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 10 case 18: @@ -2683,6 +2771,12 @@ public Builder mergeFrom( valueCase_ = 4; break; } // case 34 + case 42: + { + input.readMessage(getUriValuesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 5; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3424,6 +3518,243 @@ public Builder clearJsonValues() { return jsonValuesBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder> + uriValuesBuilder_; + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return Whether the uriValues field is set. + */ + @java.lang.Override + public boolean hasUriValues() { + return valueCase_ == 5; + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return The uriValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues getUriValues() { + if (uriValuesBuilder_ == null) { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_; + } + return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues + .getDefaultInstance(); + } else { + if (valueCase_ == 5) { + return uriValuesBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues + .getDefaultInstance(); + } + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + public Builder setUriValues( + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues value) { + if (uriValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + uriValuesBuilder_.setMessage(value); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + public Builder setUriValues( + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.Builder builderForValue) { + if (uriValuesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + uriValuesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + public Builder mergeUriValues( + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues value) { + if (uriValuesBuilder_ == null) { + if (valueCase_ == 5 + && value_ + != com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues + .getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.newBuilder( + (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 5) { + uriValuesBuilder_.mergeFrom(value); + } else { + uriValuesBuilder_.setMessage(value); + } + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + public Builder clearUriValues() { + if (uriValuesBuilder_ == null) { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + } + uriValuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.Builder + getUriValuesBuilder() { + return getUriValuesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder + getUriValuesOrBuilder() { + if ((valueCase_ == 5) && (uriValuesBuilder_ != null)) { + return uriValuesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_; + } + return com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues + .getDefaultInstance(); + } + } + + /** + * + * + *
    +     * The attribute values associated with a resource in case attribute data
    +     * type is URL, URI or IP, like gs://bucket-name/object-name.
    +     * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder> + getUriValuesFieldBuilder() { + if (uriValuesBuilder_ == null) { + if (!(valueCase_ == 5)) { + value_ = + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.getDefaultInstance(); + } + uriValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder>( + (com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 5; + onChanged(); + return uriValuesBuilder_; + } + private java.lang.Object attribute_ = ""; /** @@ -3498,7 +3829,7 @@ public Builder setAttribute(java.lang.String value) { throw new NullPointerException(); } attribute_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3519,7 +3850,7 @@ public Builder setAttribute(java.lang.String value) { */ public Builder clearAttribute() { attribute_ = getDefaultInstance().getAttribute(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -3545,7 +3876,7 @@ public Builder setAttributeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); attribute_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValuesOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValuesOrBuilder.java index bc833e91ef2f..bf3afb51f42b 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValuesOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AttributeValuesOrBuilder.java @@ -146,6 +146,46 @@ public interface AttributeValuesOrBuilder com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder getJsonValuesOrBuilder(); + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return Whether the uriValues field is set. + */ + boolean hasUriValues(); + + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + * + * @return The uriValues. + */ + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValues getUriValues(); + + /** + * + * + *
    +   * The attribute values associated with a resource in case attribute data
    +   * type is URL, URI or IP, like gs://bucket-name/object-name.
    +   * 
    + * + * .google.cloud.apihub.v1.AttributeValues.StringAttributeValues uri_values = 5; + */ + com.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesOrBuilder getUriValuesOrBuilder(); + /** * * diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfig.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfig.java new file mode 100644 index 000000000000..76cd16ff65d7 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfig.java @@ -0,0 +1,5596 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * AuthConfig represents the authentication information.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig} + */ +public final class AuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.AuthConfig) + AuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AuthConfig.newBuilder() to construct. + private AuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthConfig() { + authType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.class, + com.google.cloud.apihub.v1.AuthConfig.Builder.class); + } + + public interface UserPasswordConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Required. Username.
    +     * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + java.lang.String getUsername(); + + /** + * + * + *
    +     * Required. Username.
    +     * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the password field is set. + */ + boolean hasPassword(); + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + com.google.cloud.apihub.v1.Secret getPassword(); + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.SecretOrBuilder getPasswordOrBuilder(); + } + + /** + * + * + *
    +   * Parameters to support Username and Password Authentication.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.UserPasswordConfig} + */ + public static final class UserPasswordConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) + UserPasswordConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UserPasswordConfig.newBuilder() to construct. + private UserPasswordConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserPasswordConfig() { + username_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserPasswordConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.class, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder.class); + } + + private int bitField0_; + public static final int USERNAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + + /** + * + * + *
    +     * Required. Username.
    +     * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. Username.
    +     * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 2; + private com.google.cloud.apihub.v1.Secret password_; + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the password field is set. + */ + @java.lang.Override + public boolean hasPassword() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Secret getPassword() { + return password_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : password_; + } + + /** + * + * + *
    +     * Required. Secret version reference containing the password.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SecretOrBuilder getPasswordOrBuilder() { + return password_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : password_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(username_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPassword()); + } + 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(username_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPassword()); + } + 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.apihub.v1.AuthConfig.UserPasswordConfig)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig other = + (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) obj; + + if (!getUsername().equals(other.getUsername())) return false; + if (hasPassword() != other.hasPassword()) return false; + if (hasPassword()) { + if (!getPassword().equals(other.getPassword())) 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) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + if (hasPassword()) { + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig 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.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + 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.apihub.v1.AuthConfig.UserPasswordConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + java.io.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.apihub.v1.AuthConfig.UserPasswordConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseDelimitedFrom( + java.io.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.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.AuthConfig.UserPasswordConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Parameters to support Username and Password Authentication.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.UserPasswordConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.class, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPasswordFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + username_ = ""; + password_ = null; + if (passwordBuilder_ != null) { + passwordBuilder_.dispose(); + passwordBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig build() { + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig buildPartial() { + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig result = + new com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.username_ = username_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.password_ = passwordBuilder_ == null ? password_ : passwordBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.AuthConfig.UserPasswordConfig) { + return mergeFrom((com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig other) { + if (other == com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance()) + return this; + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPassword()) { + mergePassword(other.getPassword()); + } + 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: + { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPasswordFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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.lang.Object username_ = ""; + + /** + * + * + *
    +       * Required. Username.
    +       * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. Username.
    +       * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. Username.
    +       * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Username.
    +       * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Username.
    +       * 
    + * + * string username = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Secret password_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + passwordBuilder_; + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the password field is set. + */ + public boolean hasPassword() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The password. + */ + public com.google.cloud.apihub.v1.Secret getPassword() { + if (passwordBuilder_ == null) { + return password_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : password_; + } else { + return passwordBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPassword(com.google.cloud.apihub.v1.Secret value) { + if (passwordBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + password_ = value; + } else { + passwordBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPassword(com.google.cloud.apihub.v1.Secret.Builder builderForValue) { + if (passwordBuilder_ == null) { + password_ = builderForValue.build(); + } else { + passwordBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePassword(com.google.cloud.apihub.v1.Secret value) { + if (passwordBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && password_ != null + && password_ != com.google.cloud.apihub.v1.Secret.getDefaultInstance()) { + getPasswordBuilder().mergeFrom(value); + } else { + password_ = value; + } + } else { + passwordBuilder_.mergeFrom(value); + } + if (password_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPassword() { + bitField0_ = (bitField0_ & ~0x00000002); + password_ = null; + if (passwordBuilder_ != null) { + passwordBuilder_.dispose(); + passwordBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Secret.Builder getPasswordBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPasswordFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.SecretOrBuilder getPasswordOrBuilder() { + if (passwordBuilder_ != null) { + return passwordBuilder_.getMessageOrBuilder(); + } else { + return password_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : password_; + } + } + + /** + * + * + *
    +       * Required. Secret version reference containing the password.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret password = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + getPasswordFieldBuilder() { + if (passwordBuilder_ == null) { + passwordBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder>( + getPassword(), getParentForChildren(), isClean()); + password_ = null; + } + return passwordBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.AuthConfig.UserPasswordConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) + private static final com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig(); + } + + public static com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserPasswordConfig 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.apihub.v1.AuthConfig.UserPasswordConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Oauth2ClientCredentialsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Required. The client identifier.
    +     * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + + /** + * + * + *
    +     * Required. The client identifier.
    +     * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientSecret field is set. + */ + boolean hasClientSecret(); + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientSecret. + */ + com.google.cloud.apihub.v1.Secret getClientSecret(); + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.SecretOrBuilder getClientSecretOrBuilder(); + } + + /** + * + * + *
    +   * Parameters to support Oauth 2.0 client credentials grant authentication.
    +   * See https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig} + */ + public static final class Oauth2ClientCredentialsConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) + Oauth2ClientCredentialsConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Oauth2ClientCredentialsConfig.newBuilder() to construct. + private Oauth2ClientCredentialsConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Oauth2ClientCredentialsConfig() { + clientId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Oauth2ClientCredentialsConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.class, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder.class); + } + + private int bitField0_; + public static final int CLIENT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + + /** + * + * + *
    +     * Required. The client identifier.
    +     * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The client identifier.
    +     * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_SECRET_FIELD_NUMBER = 2; + private com.google.cloud.apihub.v1.Secret clientSecret_; + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientSecret field is set. + */ + @java.lang.Override + public boolean hasClientSecret() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientSecret. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Secret getClientSecret() { + return clientSecret_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : clientSecret_; + } + + /** + * + * + *
    +     * Required. Secret version reference containing the client secret.
    +     * The `secretmanager.versions.access` permission should be
    +     * granted to the service account accessing the secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SecretOrBuilder getClientSecretOrBuilder() { + return clientSecret_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : clientSecret_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(clientId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getClientSecret()); + } + 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(clientId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClientSecret()); + } + 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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig other = + (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) obj; + + if (!getClientId().equals(other.getClientId())) return false; + if (hasClientSecret() != other.hasClientSecret()) return false; + if (hasClientSecret()) { + if (!getClientSecret().equals(other.getClientSecret())) 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) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + if (hasClientSecret()) { + hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getClientSecret().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig 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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + 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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + java.io.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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + parseDelimitedFrom( + java.io.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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Parameters to support Oauth 2.0 client credentials grant authentication.
    +     * See https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.class, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder.class); + } + + // Construct using + // com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getClientSecretFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clientId_ = ""; + clientSecret_ = null; + if (clientSecretBuilder_ != null) { + clientSecretBuilder_.dispose(); + clientSecretBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig build() { + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig buildPartial() { + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig result = + new com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clientId_ = clientId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientSecret_ = + clientSecretBuilder_ == null ? clientSecret_ : clientSecretBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) { + return mergeFrom( + (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig other) { + if (other + == com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance()) return this; + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasClientSecret()) { + mergeClientSecret(other.getClientSecret()); + } + 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: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getClientSecretFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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.lang.Object clientId_ = ""; + + /** + * + * + *
    +       * Required. The client identifier.
    +       * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The client identifier.
    +       * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The client identifier.
    +       * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The client identifier.
    +       * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The client identifier.
    +       * 
    + * + * string client_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Secret clientSecret_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + clientSecretBuilder_; + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientSecret field is set. + */ + public boolean hasClientSecret() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientSecret. + */ + public com.google.cloud.apihub.v1.Secret getClientSecret() { + if (clientSecretBuilder_ == null) { + return clientSecret_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : clientSecret_; + } else { + return clientSecretBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientSecret(com.google.cloud.apihub.v1.Secret value) { + if (clientSecretBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientSecret_ = value; + } else { + clientSecretBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientSecret(com.google.cloud.apihub.v1.Secret.Builder builderForValue) { + if (clientSecretBuilder_ == null) { + clientSecret_ = builderForValue.build(); + } else { + clientSecretBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeClientSecret(com.google.cloud.apihub.v1.Secret value) { + if (clientSecretBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && clientSecret_ != null + && clientSecret_ != com.google.cloud.apihub.v1.Secret.getDefaultInstance()) { + getClientSecretBuilder().mergeFrom(value); + } else { + clientSecret_ = value; + } + } else { + clientSecretBuilder_.mergeFrom(value); + } + if (clientSecret_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearClientSecret() { + bitField0_ = (bitField0_ & ~0x00000002); + clientSecret_ = null; + if (clientSecretBuilder_ != null) { + clientSecretBuilder_.dispose(); + clientSecretBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Secret.Builder getClientSecretBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getClientSecretFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.SecretOrBuilder getClientSecretOrBuilder() { + if (clientSecretBuilder_ != null) { + return clientSecretBuilder_.getMessageOrBuilder(); + } else { + return clientSecret_ == null + ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() + : clientSecret_; + } + } + + /** + * + * + *
    +       * Required. Secret version reference containing the client secret.
    +       * The `secretmanager.versions.access` permission should be
    +       * granted to the service account accessing the secret.
    +       * 
    + * + * + * .google.cloud.apihub.v1.Secret client_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + getClientSecretFieldBuilder() { + if (clientSecretBuilder_ == null) { + clientSecretBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder>( + getClientSecret(), getParentForChildren(), isClean()); + clientSecret_ = null; + } + return clientSecretBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) + private static final com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig(); + } + + public static com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Oauth2ClientCredentialsConfig 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.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ApiKeyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Required. The parameter name of the API key.
    +     * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +     * "api_key" would be the parameter name.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +     * Required. The parameter name of the API key.
    +     * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +     * "api_key" would be the parameter name.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiKey field is set. + */ + boolean hasApiKey(); + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiKey. + */ + com.google.cloud.apihub.v1.Secret getApiKey(); + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.SecretOrBuilder getApiKeyOrBuilder(); + + /** + * + * + *
    +     * Required. The location of the API key.
    +     * The default value is QUERY.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for httpElementLocation. + */ + int getHttpElementLocationValue(); + + /** + * + * + *
    +     * Required. The location of the API key.
    +     * The default value is QUERY.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpElementLocation. + */ + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation getHttpElementLocation(); + } + + /** + * + * + *
    +   * Config for authentication with API key.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.ApiKeyConfig} + */ + public static final class ApiKeyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) + ApiKeyConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ApiKeyConfig.newBuilder() to construct. + private ApiKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiKeyConfig() { + name_ = ""; + httpElementLocation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiKeyConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.class, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder.class); + } + + /** + * + * + *
    +     * Enum of location an HTTP element can be.
    +     * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation} + */ + public enum HttpElementLocation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * HTTP element location not specified.
    +       * 
    + * + * HTTP_ELEMENT_LOCATION_UNSPECIFIED = 0; + */ + HTTP_ELEMENT_LOCATION_UNSPECIFIED(0), + /** + * + * + *
    +       * Element is in the HTTP request query.
    +       * 
    + * + * QUERY = 1; + */ + QUERY(1), + /** + * + * + *
    +       * Element is in the HTTP request header.
    +       * 
    + * + * HEADER = 2; + */ + HEADER(2), + /** + * + * + *
    +       * Element is in the HTTP request path.
    +       * 
    + * + * PATH = 3; + */ + PATH(3), + /** + * + * + *
    +       * Element is in the HTTP request body.
    +       * 
    + * + * BODY = 4; + */ + BODY(4), + /** + * + * + *
    +       * Element is in the HTTP request cookie.
    +       * 
    + * + * COOKIE = 5; + */ + COOKIE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * HTTP element location not specified.
    +       * 
    + * + * HTTP_ELEMENT_LOCATION_UNSPECIFIED = 0; + */ + public static final int HTTP_ELEMENT_LOCATION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +       * Element is in the HTTP request query.
    +       * 
    + * + * QUERY = 1; + */ + public static final int QUERY_VALUE = 1; + + /** + * + * + *
    +       * Element is in the HTTP request header.
    +       * 
    + * + * HEADER = 2; + */ + public static final int HEADER_VALUE = 2; + + /** + * + * + *
    +       * Element is in the HTTP request path.
    +       * 
    + * + * PATH = 3; + */ + public static final int PATH_VALUE = 3; + + /** + * + * + *
    +       * Element is in the HTTP request body.
    +       * 
    + * + * BODY = 4; + */ + public static final int BODY_VALUE = 4; + + /** + * + * + *
    +       * Element is in the HTTP request cookie.
    +       * 
    + * + * COOKIE = 5; + */ + public static final int COOKIE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HttpElementLocation 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 HttpElementLocation forNumber(int value) { + switch (value) { + case 0: + return HTTP_ELEMENT_LOCATION_UNSPECIFIED; + case 1: + return QUERY; + case 2: + return HEADER; + case 3: + return PATH; + case 4: + return BODY; + case 5: + return COOKIE; + 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 HttpElementLocation findValueByNumber(int number) { + return HttpElementLocation.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.apihub.v1.AuthConfig.ApiKeyConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HttpElementLocation[] VALUES = values(); + + public static HttpElementLocation 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 HttpElementLocation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The parameter name of the API key.
    +     * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +     * "api_key" would be the parameter name.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The parameter name of the API key.
    +     * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +     * "api_key" would be the parameter name.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_KEY_FIELD_NUMBER = 2; + private com.google.cloud.apihub.v1.Secret apiKey_; + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiKey field is set. + */ + @java.lang.Override + public boolean hasApiKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiKey. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Secret getApiKey() { + return apiKey_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : apiKey_; + } + + /** + * + * + *
    +     * Required. The name of the SecretManager secret version resource storing
    +     * the API key. Format:
    +     * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +     * `secretmanager.versions.access` permission should be granted to the
    +     * service account accessing the secret.
    +     * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SecretOrBuilder getApiKeyOrBuilder() { + return apiKey_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : apiKey_; + } + + public static final int HTTP_ELEMENT_LOCATION_FIELD_NUMBER = 3; + private int httpElementLocation_ = 0; + + /** + * + * + *
    +     * Required. The location of the API key.
    +     * The default value is QUERY.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for httpElementLocation. + */ + @java.lang.Override + public int getHttpElementLocationValue() { + return httpElementLocation_; + } + + /** + * + * + *
    +     * Required. The location of the API key.
    +     * The default value is QUERY.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpElementLocation. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation + getHttpElementLocation() { + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation result = + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation.forNumber( + httpElementLocation_); + return result == null + ? com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getApiKey()); + } + if (httpElementLocation_ + != com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation + .HTTP_ELEMENT_LOCATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, httpElementLocation_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getApiKey()); + } + if (httpElementLocation_ + != com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation + .HTTP_ELEMENT_LOCATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, httpElementLocation_); + } + 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.apihub.v1.AuthConfig.ApiKeyConfig)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig other = + (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (hasApiKey() != other.hasApiKey()) return false; + if (hasApiKey()) { + if (!getApiKey().equals(other.getApiKey())) return false; + } + if (httpElementLocation_ != other.httpElementLocation_) 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(); + if (hasApiKey()) { + hash = (37 * hash) + API_KEY_FIELD_NUMBER; + hash = (53 * hash) + getApiKey().hashCode(); + } + hash = (37 * hash) + HTTP_ELEMENT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + httpElementLocation_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig 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.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + 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.apihub.v1.AuthConfig.ApiKeyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + java.io.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.apihub.v1.AuthConfig.ApiKeyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseDelimitedFrom( + java.io.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.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.AuthConfig.ApiKeyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 authentication with API key.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig.ApiKeyConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.class, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getApiKeyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + apiKey_ = null; + if (apiKeyBuilder_ != null) { + apiKeyBuilder_.dispose(); + apiKeyBuilder_ = null; + } + httpElementLocation_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig build() { + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig buildPartial() { + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig result = + new com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.apiKey_ = apiKeyBuilder_ == null ? apiKey_ : apiKeyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.httpElementLocation_ = httpElementLocation_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.AuthConfig.ApiKeyConfig) { + return mergeFrom((com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig other) { + if (other == com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasApiKey()) { + mergeApiKey(other.getApiKey()); + } + if (other.httpElementLocation_ != 0) { + setHttpElementLocationValue(other.getHttpElementLocationValue()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getApiKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + httpElementLocation_ = input.readEnum(); + bitField0_ |= 0x00000004; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +       * Required. The parameter name of the API key.
    +       * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +       * "api_key" would be the parameter name.
    +       * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The parameter name of the API key.
    +       * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +       * "api_key" would be the parameter name.
    +       * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The parameter name of the API key.
    +       * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +       * "api_key" would be the parameter name.
    +       * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The parameter name of the API key.
    +       * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +       * "api_key" would be the parameter name.
    +       * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The parameter name of the API key.
    +       * E.g. If the API request is "https://example.com/act?api_key=<API KEY>",
    +       * "api_key" would be the parameter name.
    +       * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Secret apiKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + apiKeyBuilder_; + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiKey field is set. + */ + public boolean hasApiKey() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiKey. + */ + public com.google.cloud.apihub.v1.Secret getApiKey() { + if (apiKeyBuilder_ == null) { + return apiKey_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : apiKey_; + } else { + return apiKeyBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiKey(com.google.cloud.apihub.v1.Secret value) { + if (apiKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiKey_ = value; + } else { + apiKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiKey(com.google.cloud.apihub.v1.Secret.Builder builderForValue) { + if (apiKeyBuilder_ == null) { + apiKey_ = builderForValue.build(); + } else { + apiKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeApiKey(com.google.cloud.apihub.v1.Secret value) { + if (apiKeyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && apiKey_ != null + && apiKey_ != com.google.cloud.apihub.v1.Secret.getDefaultInstance()) { + getApiKeyBuilder().mergeFrom(value); + } else { + apiKey_ = value; + } + } else { + apiKeyBuilder_.mergeFrom(value); + } + if (apiKey_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApiKey() { + bitField0_ = (bitField0_ & ~0x00000002); + apiKey_ = null; + if (apiKeyBuilder_ != null) { + apiKeyBuilder_.dispose(); + apiKeyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Secret.Builder getApiKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getApiKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.SecretOrBuilder getApiKeyOrBuilder() { + if (apiKeyBuilder_ != null) { + return apiKeyBuilder_.getMessageOrBuilder(); + } else { + return apiKey_ == null ? com.google.cloud.apihub.v1.Secret.getDefaultInstance() : apiKey_; + } + } + + /** + * + * + *
    +       * Required. The name of the SecretManager secret version resource storing
    +       * the API key. Format:
    +       * `projects/{project}/secrets/{secrete}/versions/{version}`. The
    +       * `secretmanager.versions.access` permission should be granted to the
    +       * service account accessing the secret.
    +       * 
    + * + * .google.cloud.apihub.v1.Secret api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + getApiKeyFieldBuilder() { + if (apiKeyBuilder_ == null) { + apiKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder>( + getApiKey(), getParentForChildren(), isClean()); + apiKey_ = null; + } + return apiKeyBuilder_; + } + + private int httpElementLocation_ = 0; + + /** + * + * + *
    +       * Required. The location of the API key.
    +       * The default value is QUERY.
    +       * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for httpElementLocation. + */ + @java.lang.Override + public int getHttpElementLocationValue() { + return httpElementLocation_; + } + + /** + * + * + *
    +       * Required. The location of the API key.
    +       * The default value is QUERY.
    +       * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for httpElementLocation to set. + * @return This builder for chaining. + */ + public Builder setHttpElementLocationValue(int value) { + httpElementLocation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The location of the API key.
    +       * The default value is QUERY.
    +       * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpElementLocation. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation + getHttpElementLocation() { + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation result = + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation.forNumber( + httpElementLocation_); + return result == null + ? com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +       * Required. The location of the API key.
    +       * The default value is QUERY.
    +       * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The httpElementLocation to set. + * @return This builder for chaining. + */ + public Builder setHttpElementLocation( + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + httpElementLocation_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The location of the API key.
    +       * The default value is QUERY.
    +       * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.HttpElementLocation http_element_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearHttpElementLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + httpElementLocation_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) + private static final com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig(); + } + + public static com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiKeyConfig 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.apihub.v1.AuthConfig.ApiKeyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int configCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object config_; + + public enum ConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GOOGLE_SERVICE_ACCOUNT_CONFIG(2), + USER_PASSWORD_CONFIG(3), + API_KEY_CONFIG(4), + OAUTH2_CLIENT_CREDENTIALS_CONFIG(5), + CONFIG_NOT_SET(0); + private final int value; + + private ConfigCase(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 ConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigCase forNumber(int value) { + switch (value) { + case 2: + return GOOGLE_SERVICE_ACCOUNT_CONFIG; + case 3: + return USER_PASSWORD_CONFIG; + case 4: + return API_KEY_CONFIG; + case 5: + return OAUTH2_CLIENT_CREDENTIALS_CONFIG; + case 0: + return CONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConfigCase getConfigCase() { + return ConfigCase.forNumber(configCase_); + } + + public static final int GOOGLE_SERVICE_ACCOUNT_CONFIG_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return Whether the googleServiceAccountConfig field is set. + */ + @java.lang.Override + public boolean hasGoogleServiceAccountConfig() { + return configCase_ == 2; + } + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return The googleServiceAccountConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.GoogleServiceAccountConfig getGoogleServiceAccountConfig() { + if (configCase_ == 2) { + return (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_; + } + return com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder + getGoogleServiceAccountConfigOrBuilder() { + if (configCase_ == 2) { + return (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_; + } + return com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } + + public static final int USER_PASSWORD_CONFIG_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return Whether the userPasswordConfig field is set. + */ + @java.lang.Override + public boolean hasUserPasswordConfig() { + return configCase_ == 3; + } + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return The userPasswordConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig getUserPasswordConfig() { + if (configCase_ == 3) { + return (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder + getUserPasswordConfigOrBuilder() { + if (configCase_ == 3) { + return (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + + public static final int API_KEY_CONFIG_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return configCase_ == 4; + } + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig getApiKeyConfig() { + if (configCase_ == 4) { + return (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { + if (configCase_ == 4) { + return (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + + public static final int OAUTH2_CLIENT_CREDENTIALS_CONFIG_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return Whether the oauth2ClientCredentialsConfig field is set. + */ + @java.lang.Override + public boolean hasOauth2ClientCredentialsConfig() { + return configCase_ == 5; + } + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return The oauth2ClientCredentialsConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getOauth2ClientCredentialsConfig() { + if (configCase_ == 5) { + return (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.getDefaultInstance(); + } + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder + getOauth2ClientCredentialsConfigOrBuilder() { + if (configCase_ == 5) { + return (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.getDefaultInstance(); + } + + public static final int AUTH_TYPE_FIELD_NUMBER = 1; + private int authType_ = 0; + + /** + * + * + *
    +   * Required. The authentication type.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for authType. + */ + @java.lang.Override + public int getAuthTypeValue() { + return authType_; + } + + /** + * + * + *
    +   * Required. The authentication type.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthType getAuthType() { + com.google.cloud.apihub.v1.AuthType result = + com.google.cloud.apihub.v1.AuthType.forNumber(authType_); + return result == null ? com.google.cloud.apihub.v1.AuthType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (authType_ != com.google.cloud.apihub.v1.AuthType.AUTH_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, authType_); + } + if (configCase_ == 2) { + output.writeMessage(2, (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_); + } + if (configCase_ == 3) { + output.writeMessage(3, (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_); + } + if (configCase_ == 4) { + output.writeMessage(4, (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_); + } + if (configCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (authType_ != com.google.cloud.apihub.v1.AuthType.AUTH_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, authType_); + } + if (configCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_); + } + if (configCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_); + } + if (configCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_); + } + if (configCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_); + } + 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.apihub.v1.AuthConfig)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.AuthConfig other = (com.google.cloud.apihub.v1.AuthConfig) obj; + + if (authType_ != other.authType_) return false; + if (!getConfigCase().equals(other.getConfigCase())) return false; + switch (configCase_) { + case 2: + if (!getGoogleServiceAccountConfig().equals(other.getGoogleServiceAccountConfig())) + return false; + break; + case 3: + if (!getUserPasswordConfig().equals(other.getUserPasswordConfig())) return false; + break; + case 4: + if (!getApiKeyConfig().equals(other.getApiKeyConfig())) return false; + break; + case 5: + if (!getOauth2ClientCredentialsConfig().equals(other.getOauth2ClientCredentialsConfig())) + 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) + AUTH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + authType_; + switch (configCase_) { + case 2: + hash = (37 * hash) + GOOGLE_SERVICE_ACCOUNT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGoogleServiceAccountConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + USER_PASSWORD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getUserPasswordConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getApiKeyConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + OAUTH2_CLIENT_CREDENTIALS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOauth2ClientCredentialsConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig 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.apihub.v1.AuthConfig parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom( + 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.apihub.v1.AuthConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom( + java.io.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.apihub.v1.AuthConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseDelimitedFrom( + java.io.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.apihub.v1.AuthConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.AuthConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.AuthConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * AuthConfig represents the authentication information.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.AuthConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.AuthConfig) + com.google.cloud.apihub.v1.AuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.AuthConfig.class, + com.google.cloud.apihub.v1.AuthConfig.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.AuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (googleServiceAccountConfigBuilder_ != null) { + googleServiceAccountConfigBuilder_.clear(); + } + if (userPasswordConfigBuilder_ != null) { + userPasswordConfigBuilder_.clear(); + } + if (apiKeyConfigBuilder_ != null) { + apiKeyConfigBuilder_.clear(); + } + if (oauth2ClientCredentialsConfigBuilder_ != null) { + oauth2ClientCredentialsConfigBuilder_.clear(); + } + authType_ = 0; + configCase_ = 0; + config_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_AuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.AuthConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig build() { + com.google.cloud.apihub.v1.AuthConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig buildPartial() { + com.google.cloud.apihub.v1.AuthConfig result = + new com.google.cloud.apihub.v1.AuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.AuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.authType_ = authType_; + } + } + + private void buildPartialOneofs(com.google.cloud.apihub.v1.AuthConfig result) { + result.configCase_ = configCase_; + result.config_ = this.config_; + if (configCase_ == 2 && googleServiceAccountConfigBuilder_ != null) { + result.config_ = googleServiceAccountConfigBuilder_.build(); + } + if (configCase_ == 3 && userPasswordConfigBuilder_ != null) { + result.config_ = userPasswordConfigBuilder_.build(); + } + if (configCase_ == 4 && apiKeyConfigBuilder_ != null) { + result.config_ = apiKeyConfigBuilder_.build(); + } + if (configCase_ == 5 && oauth2ClientCredentialsConfigBuilder_ != null) { + result.config_ = oauth2ClientCredentialsConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.AuthConfig) { + return mergeFrom((com.google.cloud.apihub.v1.AuthConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.AuthConfig other) { + if (other == com.google.cloud.apihub.v1.AuthConfig.getDefaultInstance()) return this; + if (other.authType_ != 0) { + setAuthTypeValue(other.getAuthTypeValue()); + } + switch (other.getConfigCase()) { + case GOOGLE_SERVICE_ACCOUNT_CONFIG: + { + mergeGoogleServiceAccountConfig(other.getGoogleServiceAccountConfig()); + break; + } + case USER_PASSWORD_CONFIG: + { + mergeUserPasswordConfig(other.getUserPasswordConfig()); + break; + } + case API_KEY_CONFIG: + { + mergeApiKeyConfig(other.getApiKeyConfig()); + break; + } + case OAUTH2_CLIENT_CREDENTIALS_CONFIG: + { + mergeOauth2ClientCredentialsConfig(other.getOauth2ClientCredentialsConfig()); + break; + } + case CONFIG_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 8: + { + authType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 8 + case 18: + { + input.readMessage( + getGoogleServiceAccountConfigFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getUserPasswordConfigFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getOauth2ClientCredentialsConfigFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 5; + 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 configCase_ = 0; + private java.lang.Object config_; + + public ConfigCase getConfigCase() { + return ConfigCase.forNumber(configCase_); + } + + public Builder clearConfig() { + configCase_ = 0; + config_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.GoogleServiceAccountConfig, + com.google.cloud.apihub.v1.GoogleServiceAccountConfig.Builder, + com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder> + googleServiceAccountConfigBuilder_; + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return Whether the googleServiceAccountConfig field is set. + */ + @java.lang.Override + public boolean hasGoogleServiceAccountConfig() { + return configCase_ == 2; + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return The googleServiceAccountConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.GoogleServiceAccountConfig getGoogleServiceAccountConfig() { + if (googleServiceAccountConfigBuilder_ == null) { + if (configCase_ == 2) { + return (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_; + } + return com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } else { + if (configCase_ == 2) { + return googleServiceAccountConfigBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + public Builder setGoogleServiceAccountConfig( + com.google.cloud.apihub.v1.GoogleServiceAccountConfig value) { + if (googleServiceAccountConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + googleServiceAccountConfigBuilder_.setMessage(value); + } + configCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + public Builder setGoogleServiceAccountConfig( + com.google.cloud.apihub.v1.GoogleServiceAccountConfig.Builder builderForValue) { + if (googleServiceAccountConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + googleServiceAccountConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + public Builder mergeGoogleServiceAccountConfig( + com.google.cloud.apihub.v1.GoogleServiceAccountConfig value) { + if (googleServiceAccountConfigBuilder_ == null) { + if (configCase_ == 2 + && config_ + != com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance()) { + config_ = + com.google.cloud.apihub.v1.GoogleServiceAccountConfig.newBuilder( + (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 2) { + googleServiceAccountConfigBuilder_.mergeFrom(value); + } else { + googleServiceAccountConfigBuilder_.setMessage(value); + } + } + configCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + public Builder clearGoogleServiceAccountConfig() { + if (googleServiceAccountConfigBuilder_ == null) { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + } + googleServiceAccountConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + public com.google.cloud.apihub.v1.GoogleServiceAccountConfig.Builder + getGoogleServiceAccountConfigBuilder() { + return getGoogleServiceAccountConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder + getGoogleServiceAccountConfigOrBuilder() { + if ((configCase_ == 2) && (googleServiceAccountConfigBuilder_ != null)) { + return googleServiceAccountConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 2) { + return (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_; + } + return com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Google Service Account.
    +     * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.GoogleServiceAccountConfig, + com.google.cloud.apihub.v1.GoogleServiceAccountConfig.Builder, + com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder> + getGoogleServiceAccountConfigFieldBuilder() { + if (googleServiceAccountConfigBuilder_ == null) { + if (!(configCase_ == 2)) { + config_ = com.google.cloud.apihub.v1.GoogleServiceAccountConfig.getDefaultInstance(); + } + googleServiceAccountConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.GoogleServiceAccountConfig, + com.google.cloud.apihub.v1.GoogleServiceAccountConfig.Builder, + com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder>( + (com.google.cloud.apihub.v1.GoogleServiceAccountConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 2; + onChanged(); + return googleServiceAccountConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder> + userPasswordConfigBuilder_; + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return Whether the userPasswordConfig field is set. + */ + @java.lang.Override + public boolean hasUserPasswordConfig() { + return configCase_ == 3; + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return The userPasswordConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig getUserPasswordConfig() { + if (userPasswordConfigBuilder_ == null) { + if (configCase_ == 3) { + return (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } else { + if (configCase_ == 3) { + return userPasswordConfigBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + public Builder setUserPasswordConfig( + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig value) { + if (userPasswordConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + userPasswordConfigBuilder_.setMessage(value); + } + configCase_ = 3; + return this; + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + public Builder setUserPasswordConfig( + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder builderForValue) { + if (userPasswordConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + userPasswordConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 3; + return this; + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + public Builder mergeUserPasswordConfig( + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig value) { + if (userPasswordConfigBuilder_ == null) { + if (configCase_ == 3 + && config_ + != com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance()) { + config_ = + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.newBuilder( + (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 3) { + userPasswordConfigBuilder_.mergeFrom(value); + } else { + userPasswordConfigBuilder_.setMessage(value); + } + } + configCase_ = 3; + return this; + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + public Builder clearUserPasswordConfig() { + if (userPasswordConfigBuilder_ == null) { + if (configCase_ == 3) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 3) { + configCase_ = 0; + config_ = null; + } + userPasswordConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder + getUserPasswordConfigBuilder() { + return getUserPasswordConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder + getUserPasswordConfigOrBuilder() { + if ((configCase_ == 3) && (userPasswordConfigBuilder_ != null)) { + return userPasswordConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 3) { + return (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * User Password.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder> + getUserPasswordConfigFieldBuilder() { + if (userPasswordConfigBuilder_ == null) { + if (!(configCase_ == 3)) { + config_ = com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.getDefaultInstance(); + } + userPasswordConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder>( + (com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 3; + onChanged(); + return userPasswordConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder> + apiKeyConfigBuilder_; + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return configCase_ == 4; + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig getApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (configCase_ == 4) { + return (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } else { + if (configCase_ == 4) { + return apiKeyConfigBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + public Builder setApiKeyConfig(com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + configCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + public Builder setApiKeyConfig( + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder builderForValue) { + if (apiKeyConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + public Builder mergeApiKeyConfig(com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (configCase_ == 4 + && config_ != com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance()) { + config_ = + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.newBuilder( + (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 4) { + apiKeyConfigBuilder_.mergeFrom(value); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + } + configCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + public Builder clearApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (configCase_ == 4) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 4) { + configCase_ = 0; + config_ = null; + } + apiKeyConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder getApiKeyConfigBuilder() { + return getApiKeyConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { + if ((configCase_ == 4) && (apiKeyConfigBuilder_ != null)) { + return apiKeyConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 4) { + return (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Api Key Config.
    +     * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder> + getApiKeyConfigFieldBuilder() { + if (apiKeyConfigBuilder_ == null) { + if (!(configCase_ == 4)) { + config_ = com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.getDefaultInstance(); + } + apiKeyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder>( + (com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 4; + onChanged(); + return apiKeyConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder> + oauth2ClientCredentialsConfigBuilder_; + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return Whether the oauth2ClientCredentialsConfig field is set. + */ + @java.lang.Override + public boolean hasOauth2ClientCredentialsConfig() { + return configCase_ == 5; + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return The oauth2ClientCredentialsConfig. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getOauth2ClientCredentialsConfig() { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + if (configCase_ == 5) { + return (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance(); + } else { + if (configCase_ == 5) { + return oauth2ClientCredentialsConfigBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + public Builder setOauth2ClientCredentialsConfig( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig value) { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + oauth2ClientCredentialsConfigBuilder_.setMessage(value); + } + configCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + public Builder setOauth2ClientCredentialsConfig( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder + builderForValue) { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + oauth2ClientCredentialsConfigBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + public Builder mergeOauth2ClientCredentialsConfig( + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig value) { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + if (configCase_ == 5 + && config_ + != com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance()) { + config_ = + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.newBuilder( + (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 5) { + oauth2ClientCredentialsConfigBuilder_.mergeFrom(value); + } else { + oauth2ClientCredentialsConfigBuilder_.setMessage(value); + } + } + configCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + public Builder clearOauth2ClientCredentialsConfig() { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + if (configCase_ == 5) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 5) { + configCase_ = 0; + config_ = null; + } + oauth2ClientCredentialsConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder + getOauth2ClientCredentialsConfigBuilder() { + return getOauth2ClientCredentialsConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder + getOauth2ClientCredentialsConfigOrBuilder() { + if ((configCase_ == 5) && (oauth2ClientCredentialsConfigBuilder_ != null)) { + return oauth2ClientCredentialsConfigBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 5) { + return (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_; + } + return com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Oauth2.0 Client Credentials.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder> + getOauth2ClientCredentialsConfigFieldBuilder() { + if (oauth2ClientCredentialsConfigBuilder_ == null) { + if (!(configCase_ == 5)) { + config_ = + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + .getDefaultInstance(); + } + oauth2ClientCredentialsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig.Builder, + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder>( + (com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 5; + onChanged(); + return oauth2ClientCredentialsConfigBuilder_; + } + + private int authType_ = 0; + + /** + * + * + *
    +     * Required. The authentication type.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for authType. + */ + @java.lang.Override + public int getAuthTypeValue() { + return authType_; + } + + /** + * + * + *
    +     * Required. The authentication type.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for authType to set. + * @return This builder for chaining. + */ + public Builder setAuthTypeValue(int value) { + authType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The authentication type.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AuthType getAuthType() { + com.google.cloud.apihub.v1.AuthType result = + com.google.cloud.apihub.v1.AuthType.forNumber(authType_); + return result == null ? com.google.cloud.apihub.v1.AuthType.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Required. The authentication type.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The authType to set. + * @return This builder for chaining. + */ + public Builder setAuthType(com.google.cloud.apihub.v1.AuthType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + authType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The authentication type.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAuthType() { + bitField0_ = (bitField0_ & ~0x00000010); + authType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.AuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.AuthConfig) + private static final com.google.cloud.apihub.v1.AuthConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.AuthConfig(); + } + + public static com.google.cloud.apihub.v1.AuthConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthConfig 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.apihub.v1.AuthConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfigOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfigOrBuilder.java new file mode 100644 index 000000000000..b48271754cfd --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthConfigOrBuilder.java @@ -0,0 +1,217 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface AuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.AuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return Whether the googleServiceAccountConfig field is set. + */ + boolean hasGoogleServiceAccountConfig(); + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + * + * @return The googleServiceAccountConfig. + */ + com.google.cloud.apihub.v1.GoogleServiceAccountConfig getGoogleServiceAccountConfig(); + + /** + * + * + *
    +   * Google Service Account.
    +   * 
    + * + * .google.cloud.apihub.v1.GoogleServiceAccountConfig google_service_account_config = 2; + * + */ + com.google.cloud.apihub.v1.GoogleServiceAccountConfigOrBuilder + getGoogleServiceAccountConfigOrBuilder(); + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return Whether the userPasswordConfig field is set. + */ + boolean hasUserPasswordConfig(); + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + * + * @return The userPasswordConfig. + */ + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfig getUserPasswordConfig(); + + /** + * + * + *
    +   * User Password.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.UserPasswordConfig user_password_config = 3; + */ + com.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigOrBuilder + getUserPasswordConfigOrBuilder(); + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return Whether the apiKeyConfig field is set. + */ + boolean hasApiKeyConfig(); + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + * + * @return The apiKeyConfig. + */ + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfig getApiKeyConfig(); + + /** + * + * + *
    +   * Api Key Config.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthConfig.ApiKeyConfig api_key_config = 4; + */ + com.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder(); + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return Whether the oauth2ClientCredentialsConfig field is set. + */ + boolean hasOauth2ClientCredentialsConfig(); + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + * + * @return The oauth2ClientCredentialsConfig. + */ + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig + getOauth2ClientCredentialsConfig(); + + /** + * + * + *
    +   * Oauth2.0 Client Credentials.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfig oauth2_client_credentials_config = 5; + * + */ + com.google.cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigOrBuilder + getOauth2ClientCredentialsConfigOrBuilder(); + + /** + * + * + *
    +   * Required. The authentication type.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for authType. + */ + int getAuthTypeValue(); + + /** + * + * + *
    +   * Required. The authentication type.
    +   * 
    + * + * .google.cloud.apihub.v1.AuthType auth_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authType. + */ + com.google.cloud.apihub.v1.AuthType getAuthType(); + + com.google.cloud.apihub.v1.AuthConfig.ConfigCase getConfigCase(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthType.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthType.java new file mode 100644 index 000000000000..3f76ba99d5a5 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/AuthType.java @@ -0,0 +1,248 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * AuthType represents the authentication type.
    + * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.AuthType} + */ +public enum AuthType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * Authentication type not specified.
    +   * 
    + * + * AUTH_TYPE_UNSPECIFIED = 0; + */ + AUTH_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +   * No authentication.
    +   * 
    + * + * NO_AUTH = 1; + */ + NO_AUTH(1), + /** + * + * + *
    +   * Google service account authentication.
    +   * 
    + * + * GOOGLE_SERVICE_ACCOUNT = 2; + */ + GOOGLE_SERVICE_ACCOUNT(2), + /** + * + * + *
    +   * Username and password authentication.
    +   * 
    + * + * USER_PASSWORD = 3; + */ + USER_PASSWORD(3), + /** + * + * + *
    +   * API Key authentication.
    +   * 
    + * + * API_KEY = 4; + */ + API_KEY(4), + /** + * + * + *
    +   * Oauth 2.0 client credentials grant authentication.
    +   * 
    + * + * OAUTH2_CLIENT_CREDENTIALS = 5; + */ + OAUTH2_CLIENT_CREDENTIALS(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * Authentication type not specified.
    +   * 
    + * + * AUTH_TYPE_UNSPECIFIED = 0; + */ + public static final int AUTH_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +   * No authentication.
    +   * 
    + * + * NO_AUTH = 1; + */ + public static final int NO_AUTH_VALUE = 1; + + /** + * + * + *
    +   * Google service account authentication.
    +   * 
    + * + * GOOGLE_SERVICE_ACCOUNT = 2; + */ + public static final int GOOGLE_SERVICE_ACCOUNT_VALUE = 2; + + /** + * + * + *
    +   * Username and password authentication.
    +   * 
    + * + * USER_PASSWORD = 3; + */ + public static final int USER_PASSWORD_VALUE = 3; + + /** + * + * + *
    +   * API Key authentication.
    +   * 
    + * + * API_KEY = 4; + */ + public static final int API_KEY_VALUE = 4; + + /** + * + * + *
    +   * Oauth 2.0 client credentials grant authentication.
    +   * 
    + * + * OAUTH2_CLIENT_CREDENTIALS = 5; + */ + public static final int OAUTH2_CLIENT_CREDENTIALS_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthType 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 AuthType forNumber(int value) { + switch (value) { + case 0: + return AUTH_TYPE_UNSPECIFIED; + case 1: + return NO_AUTH; + case 2: + return GOOGLE_SERVICE_ACCOUNT; + case 3: + return USER_PASSWORD; + case 4: + return API_KEY; + case 5: + return OAUTH2_CLIENT_CREDENTIALS; + 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 AuthType findValueByNumber(int number) { + return AuthType.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.apihub.v1.CommonFieldsProto.getDescriptor().getEnumTypes().get(3); + } + + private static final AuthType[] VALUES = values(); + + public static AuthType 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 AuthType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.AuthType) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequest.java new file mode 100644 index 000000000000..38489cdbab33 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequest.java @@ -0,0 +1,1552 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The CollectApiData method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CollectApiDataRequest} + */ +public final class CollectApiDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CollectApiDataRequest) + CollectApiDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CollectApiDataRequest.newBuilder() to construct. + private CollectApiDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CollectApiDataRequest() { + location_ = ""; + collectionType_ = 0; + pluginInstance_ = ""; + actionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CollectApiDataRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CollectApiDataRequest.class, + com.google.cloud.apihub.v1.CollectApiDataRequest.Builder.class); + } + + private int bitField0_; + public static final int LOCATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
    +   * Required. The regional location of the API hub instance and its resources.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 regional location of the API hub instance and its resources.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + + public static final int COLLECTION_TYPE_FIELD_NUMBER = 2; + private int collectionType_ = 0; + + /** + * + * + *
    +   * Required. The type of collection. Applies to all entries in
    +   * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +   * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for collectionType. + */ + @java.lang.Override + public int getCollectionTypeValue() { + return collectionType_; + } + + /** + * + * + *
    +   * Required. The type of collection. Applies to all entries in
    +   * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +   * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collectionType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CollectionType getCollectionType() { + com.google.cloud.apihub.v1.CollectionType result = + com.google.cloud.apihub.v1.CollectionType.forNumber(collectionType_); + return result == null ? com.google.cloud.apihub.v1.CollectionType.UNRECOGNIZED : result; + } + + public static final int PLUGIN_INSTANCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginInstance_ = ""; + + /** + * + * + *
    +   * Required. The plugin instance collecting the API data.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + @java.lang.Override + public java.lang.String getPluginInstance() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstance_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The plugin instance collecting the API data.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginInstanceBytes() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object actionId_ = ""; + + /** + * + * + *
    +   * Required. The action ID to be used for collecting the API data.
    +   * This should map to one of the action IDs specified
    +   * in action configs in the plugin.
    +   * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + @java.lang.Override + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The action ID to be used for collecting the API data.
    +   * This should map to one of the action IDs specified
    +   * in action configs in the plugin.
    +   * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_DATA_FIELD_NUMBER = 5; + private com.google.cloud.apihub.v1.ApiData apiData_; + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiData field is set. + */ + @java.lang.Override + public boolean hasApiData() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiData. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiData getApiData() { + return apiData_ == null ? com.google.cloud.apihub.v1.ApiData.getDefaultInstance() : apiData_; + } + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiDataOrBuilder getApiDataOrBuilder() { + return apiData_ == null ? com.google.cloud.apihub.v1.ApiData.getDefaultInstance() : apiData_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (collectionType_ + != com.google.cloud.apihub.v1.CollectionType.COLLECTION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, collectionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pluginInstance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, actionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getApiData()); + } + 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(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (collectionType_ + != com.google.cloud.apihub.v1.CollectionType.COLLECTION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, collectionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pluginInstance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, actionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getApiData()); + } + 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.apihub.v1.CollectApiDataRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CollectApiDataRequest other = + (com.google.cloud.apihub.v1.CollectApiDataRequest) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (collectionType_ != other.collectionType_) return false; + if (!getPluginInstance().equals(other.getPluginInstance())) return false; + if (!getActionId().equals(other.getActionId())) return false; + if (hasApiData() != other.hasApiData()) return false; + if (hasApiData()) { + if (!getApiData().equals(other.getApiData())) 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) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + COLLECTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + collectionType_; + hash = (37 * hash) + PLUGIN_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getPluginInstance().hashCode(); + hash = (37 * hash) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId().hashCode(); + if (hasApiData()) { + hash = (37 * hash) + API_DATA_FIELD_NUMBER; + hash = (53 * hash) + getApiData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest 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.apihub.v1.CollectApiDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom( + 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.apihub.v1.CollectApiDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom( + java.io.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.apihub.v1.CollectApiDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseDelimitedFrom( + java.io.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.apihub.v1.CollectApiDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CollectApiDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The CollectApiData method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CollectApiDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CollectApiDataRequest) + com.google.cloud.apihub.v1.CollectApiDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CollectApiDataRequest.class, + com.google.cloud.apihub.v1.CollectApiDataRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CollectApiDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getApiDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = ""; + collectionType_ = 0; + pluginInstance_ = ""; + actionId_ = ""; + apiData_ = null; + if (apiDataBuilder_ != null) { + apiDataBuilder_.dispose(); + apiDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CollectApiDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataRequest build() { + com.google.cloud.apihub.v1.CollectApiDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataRequest buildPartial() { + com.google.cloud.apihub.v1.CollectApiDataRequest result = + new com.google.cloud.apihub.v1.CollectApiDataRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CollectApiDataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collectionType_ = collectionType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pluginInstance_ = pluginInstance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.actionId_ = actionId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.apiData_ = apiDataBuilder_ == null ? apiData_ : apiDataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CollectApiDataRequest) { + return mergeFrom((com.google.cloud.apihub.v1.CollectApiDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CollectApiDataRequest other) { + if (other == com.google.cloud.apihub.v1.CollectApiDataRequest.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.collectionType_ != 0) { + setCollectionTypeValue(other.getCollectionTypeValue()); + } + if (!other.getPluginInstance().isEmpty()) { + pluginInstance_ = other.pluginInstance_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getActionId().isEmpty()) { + actionId_ = other.actionId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasApiData()) { + mergeApiData(other.getApiData()); + } + 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: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + collectionType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pluginInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + actionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getApiDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + 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 java.lang.Object location_ = ""; + + /** + * + * + *
    +     * Required. The regional location of the API hub instance and its resources.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 regional location of the API hub instance and its resources.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 regional location of the API hub instance and its resources.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The regional location of the API hub instance and its resources.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The regional location of the API hub instance and its resources.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int collectionType_ = 0; + + /** + * + * + *
    +     * Required. The type of collection. Applies to all entries in
    +     * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +     * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for collectionType. + */ + @java.lang.Override + public int getCollectionTypeValue() { + return collectionType_; + } + + /** + * + * + *
    +     * Required. The type of collection. Applies to all entries in
    +     * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +     * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for collectionType to set. + * @return This builder for chaining. + */ + public Builder setCollectionTypeValue(int value) { + collectionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The type of collection. Applies to all entries in
    +     * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +     * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collectionType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CollectionType getCollectionType() { + com.google.cloud.apihub.v1.CollectionType result = + com.google.cloud.apihub.v1.CollectionType.forNumber(collectionType_); + return result == null ? com.google.cloud.apihub.v1.CollectionType.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Required. The type of collection. Applies to all entries in
    +     * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +     * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The collectionType to set. + * @return This builder for chaining. + */ + public Builder setCollectionType(com.google.cloud.apihub.v1.CollectionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + collectionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The type of collection. Applies to all entries in
    +     * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +     * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCollectionType() { + bitField0_ = (bitField0_ & ~0x00000002); + collectionType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pluginInstance_ = ""; + + /** + * + * + *
    +     * Required. The plugin instance collecting the API data.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + public java.lang.String getPluginInstance() { + java.lang.Object ref = pluginInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The plugin instance collecting the API data.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + public com.google.protobuf.ByteString getPluginInstanceBytes() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The plugin instance collecting the API data.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The pluginInstance to set. + * @return This builder for chaining. + */ + public Builder setPluginInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginInstance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance collecting the API data.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPluginInstance() { + pluginInstance_ = getDefaultInstance().getPluginInstance(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance collecting the API data.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for pluginInstance to set. + * @return This builder for chaining. + */ + public Builder setPluginInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginInstance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object actionId_ = ""; + + /** + * + * + *
    +     * Required. The action ID to be used for collecting the API data.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The action ID to be used for collecting the API data.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The action ID to be used for collecting the API data.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action ID to be used for collecting the API data.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + actionId_ = getDefaultInstance().getActionId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action ID to be used for collecting the API data.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for actionId to set. + * @return This builder for chaining. + */ + public Builder setActionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.ApiData apiData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiData, + com.google.cloud.apihub.v1.ApiData.Builder, + com.google.cloud.apihub.v1.ApiDataOrBuilder> + apiDataBuilder_; + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiData field is set. + */ + public boolean hasApiData() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiData. + */ + public com.google.cloud.apihub.v1.ApiData getApiData() { + if (apiDataBuilder_ == null) { + return apiData_ == null + ? com.google.cloud.apihub.v1.ApiData.getDefaultInstance() + : apiData_; + } else { + return apiDataBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiData(com.google.cloud.apihub.v1.ApiData value) { + if (apiDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiData_ = value; + } else { + apiDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiData(com.google.cloud.apihub.v1.ApiData.Builder builderForValue) { + if (apiDataBuilder_ == null) { + apiData_ = builderForValue.build(); + } else { + apiDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeApiData(com.google.cloud.apihub.v1.ApiData value) { + if (apiDataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && apiData_ != null + && apiData_ != com.google.cloud.apihub.v1.ApiData.getDefaultInstance()) { + getApiDataBuilder().mergeFrom(value); + } else { + apiData_ = value; + } + } else { + apiDataBuilder_.mergeFrom(value); + } + if (apiData_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApiData() { + bitField0_ = (bitField0_ & ~0x00000010); + apiData_ = null; + if (apiDataBuilder_ != null) { + apiDataBuilder_.dispose(); + apiDataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.ApiData.Builder getApiDataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getApiDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.ApiDataOrBuilder getApiDataOrBuilder() { + if (apiDataBuilder_ != null) { + return apiDataBuilder_.getMessageOrBuilder(); + } else { + return apiData_ == null + ? com.google.cloud.apihub.v1.ApiData.getDefaultInstance() + : apiData_; + } + } + + /** + * + * + *
    +     * Required. The API data to be collected.
    +     * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiData, + com.google.cloud.apihub.v1.ApiData.Builder, + com.google.cloud.apihub.v1.ApiDataOrBuilder> + getApiDataFieldBuilder() { + if (apiDataBuilder_ == null) { + apiDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiData, + com.google.cloud.apihub.v1.ApiData.Builder, + com.google.cloud.apihub.v1.ApiDataOrBuilder>( + getApiData(), getParentForChildren(), isClean()); + apiData_ = null; + } + return apiDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.CollectApiDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CollectApiDataRequest) + private static final com.google.cloud.apihub.v1.CollectApiDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CollectApiDataRequest(); + } + + public static com.google.cloud.apihub.v1.CollectApiDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollectApiDataRequest 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.apihub.v1.CollectApiDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequestOrBuilder.java new file mode 100644 index 000000000000..d1efb11252f7 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CollectApiDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CollectApiDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The regional location of the API hub instance and its resources.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
    +   * Required. The regional location of the API hub instance and its resources.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
    +   * Required. The type of collection. Applies to all entries in
    +   * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +   * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for collectionType. + */ + int getCollectionTypeValue(); + + /** + * + * + *
    +   * Required. The type of collection. Applies to all entries in
    +   * [api_data][google.cloud.apihub.v1.CollectApiDataRequest.api_data].
    +   * 
    + * + * + * .google.cloud.apihub.v1.CollectionType collection_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collectionType. + */ + com.google.cloud.apihub.v1.CollectionType getCollectionType(); + + /** + * + * + *
    +   * Required. The plugin instance collecting the API data.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + java.lang.String getPluginInstance(); + + /** + * + * + *
    +   * Required. The plugin instance collecting the API data.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + com.google.protobuf.ByteString getPluginInstanceBytes(); + + /** + * + * + *
    +   * Required. The action ID to be used for collecting the API data.
    +   * This should map to one of the action IDs specified
    +   * in action configs in the plugin.
    +   * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + java.lang.String getActionId(); + + /** + * + * + *
    +   * Required. The action ID to be used for collecting the API data.
    +   * This should map to one of the action IDs specified
    +   * in action configs in the plugin.
    +   * 
    + * + * string action_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + com.google.protobuf.ByteString getActionIdBytes(); + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiData field is set. + */ + boolean hasApiData(); + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiData. + */ + com.google.cloud.apihub.v1.ApiData getApiData(); + + /** + * + * + *
    +   * Required. The API data to be collected.
    +   * 
    + * + * .google.cloud.apihub.v1.ApiData api_data = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.ApiDataOrBuilder getApiDataOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponse.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponse.java new file mode 100644 index 000000000000..7c855aa6b3d4 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponse.java @@ -0,0 +1,434 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The CollectApiData method's response.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CollectApiDataResponse} + */ +public final class CollectApiDataResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CollectApiDataResponse) + CollectApiDataResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CollectApiDataResponse.newBuilder() to construct. + private CollectApiDataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CollectApiDataResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CollectApiDataResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CollectApiDataResponse.class, + com.google.cloud.apihub.v1.CollectApiDataResponse.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.apihub.v1.CollectApiDataResponse)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CollectApiDataResponse other = + (com.google.cloud.apihub.v1.CollectApiDataResponse) 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.apihub.v1.CollectApiDataResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse 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.apihub.v1.CollectApiDataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseFrom( + 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.apihub.v1.CollectApiDataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseFrom( + java.io.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.apihub.v1.CollectApiDataResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseDelimitedFrom( + java.io.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.apihub.v1.CollectApiDataResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CollectApiDataResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The CollectApiData method's response.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CollectApiDataResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CollectApiDataResponse) + com.google.cloud.apihub.v1.CollectApiDataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CollectApiDataResponse.class, + com.google.cloud.apihub.v1.CollectApiDataResponse.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CollectApiDataResponse.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.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_CollectApiDataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataResponse getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CollectApiDataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataResponse build() { + com.google.cloud.apihub.v1.CollectApiDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CollectApiDataResponse buildPartial() { + com.google.cloud.apihub.v1.CollectApiDataResponse result = + new com.google.cloud.apihub.v1.CollectApiDataResponse(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.apihub.v1.CollectApiDataResponse) { + return mergeFrom((com.google.cloud.apihub.v1.CollectApiDataResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CollectApiDataResponse other) { + if (other == com.google.cloud.apihub.v1.CollectApiDataResponse.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.apihub.v1.CollectApiDataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CollectApiDataResponse) + private static final com.google.cloud.apihub.v1.CollectApiDataResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CollectApiDataResponse(); + } + + public static com.google.cloud.apihub.v1.CollectApiDataResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollectApiDataResponse 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.apihub.v1.CollectApiDataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponseOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponseOrBuilder.java new file mode 100644 index 000000000000..64fe68b2ab4d --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectApiDataResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CollectApiDataResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CollectApiDataResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectServiceProto.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectServiceProto.java new file mode 100644 index 000000000000..a673e0b95b6f --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectServiceProto.java @@ -0,0 +1,237 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public final class CollectServiceProto { + private CollectServiceProto() {} + + 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_apihub_v1_CollectApiDataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_CollectApiDataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ApiData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ApiData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ApiMetadataList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_APIMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_APIMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_VersionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_VersionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_SpecMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_SpecMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DeploymentMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_CollectApiDataResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_CollectApiDataResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/apihub/v1/collect_service" + + ".proto\022\026google.cloud.apihub.v1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032*google/cloud/" + + "apihub/v1/common_fields.proto\032#google/lo" + + "ngrunning/operations.proto\032\037google/proto" + + "buf/timestamp.proto\"\261\002\n\025CollectApiDataRe" + + "quest\022;\n\010location\030\001 \001(\tB)\340A\002\372A#\n!locatio" + + "ns.googleapis.com/Location\022D\n\017collection" + + "_type\030\002 \001(\0162&.google.cloud.apihub.v1.Col" + + "lectionTypeB\003\340A\002\022E\n\017plugin_instance\030\003 \001(" + + "\tB,\340A\002\372A&\n$apihub.googleapis.com/PluginI" + + "nstance\022\026\n\taction_id\030\004 \001(\tB\003\340A\002\0226\n\010api_d" + + "ata\030\005 \001(\0132\037.google.cloud.apihub.v1.ApiDa" + + "taB\003\340A\002\"\\\n\007ApiData\022I\n\021api_metadata_list\030" + + "\001 \001(\0132\'.google.cloud.apihub.v1.ApiMetada" + + "taListB\003\340A\001H\000B\006\n\004Data\"Q\n\017ApiMetadataList" + + "\022>\n\014api_metadata\030\001 \003(\0132#.google.cloud.ap" + + "ihub.v1.APIMetadataB\003\340A\002\"\224\002\n\013APIMetadata" + + "\022-\n\003api\030\001 \001(\0132\033.google.cloud.apihub.v1.A" + + "piB\003\340A\002\022>\n\010versions\030\002 \003(\0132\'.google.cloud" + + ".apihub.v1.VersionMetadataB\003\340A\001\022\030\n\013origi" + + "nal_id\030\003 \001(\tB\003\340A\001\022=\n\024original_create_tim" + + "e\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\001" + + "\022=\n\024original_update_time\030\005 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\002\"\340\002\n\017VersionMetad" + + "ata\0225\n\007version\030\001 \001(\0132\037.google.cloud.apih" + + "ub.v1.VersionB\003\340A\002\0228\n\005specs\030\002 \003(\0132$.goog" + + "le.cloud.apihub.v1.SpecMetadataB\003\340A\001\022D\n\013" + + "deployments\030\004 \003(\0132*.google.cloud.apihub." + + "v1.DeploymentMetadataB\003\340A\001\022\030\n\013original_i" + + "d\030\005 \001(\tB\003\340A\001\022=\n\024original_create_time\030\006 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\001\022=\n\024o" + + "riginal_update_time\030\007 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\002\"\327\001\n\014SpecMetadata\022/\n\004s" + + "pec\030\001 \001(\0132\034.google.cloud.apihub.v1.SpecB" + + "\003\340A\002\022\030\n\013original_id\030\002 \001(\tB\003\340A\001\022=\n\024origin" + + "al_create_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\001\022=\n\024original_update_time\030\004 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\002\"\351\001\n" + + "\022DeploymentMetadata\022;\n\ndeployment\030\001 \001(\0132" + + "\".google.cloud.apihub.v1.DeploymentB\003\340A\002" + + "\022\030\n\013original_id\030\002 \001(\tB\003\340A\001\022=\n\024original_c" + + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\001\022=\n\024original_update_time\030\004 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\002\"\030\n\026Coll" + + "ectApiDataResponse*i\n\016CollectionType\022\037\n\033" + + "COLLECTION_TYPE_UNSPECIFIED\020\000\022\032\n\026COLLECT" + + "ION_TYPE_UPSERT\020\001\022\032\n\026COLLECTION_TYPE_DEL" + + "ETE\020\0022\317\002\n\rApiHubCollect\022\362\001\n\016CollectApiDa" + + "ta\022-.google.cloud.apihub.v1.CollectApiDa" + + "taRequest\032\035.google.longrunning.Operation" + + "\"\221\001\312A+\n\026CollectApiDataResponse\022\021Operatio" + + "nMetadata\332A!location,collection_type,api" + + "_data\202\323\344\223\0029\"4/v1/{location=projects/*/lo" + + "cations/*}:collectApiData:\001*\032I\312A\025apihub." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\265\001\n\032com.google.c" + + "loud.apihub.v1B\023CollectServiceProtoP\001Z2c" + + "loud.google.com/go/apihub/apiv1/apihubpb" + + ";apihubpb\252\002\026Google.Cloud.ApiHub.V1\312\002\026Goo" + + "gle\\Cloud\\ApiHub\\V1\352\002\031Google::Cloud::Api" + + "Hub::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.apihub.v1.CommonFieldsProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_apihub_v1_CollectApiDataRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_apihub_v1_CollectApiDataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_CollectApiDataRequest_descriptor, + new java.lang.String[] { + "Location", "CollectionType", "PluginInstance", "ActionId", "ApiData", + }); + internal_static_google_cloud_apihub_v1_ApiData_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_apihub_v1_ApiData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ApiData_descriptor, + new java.lang.String[] { + "ApiMetadataList", "Data", + }); + internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_apihub_v1_ApiMetadataList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ApiMetadataList_descriptor, + new java.lang.String[] { + "ApiMetadata", + }); + internal_static_google_cloud_apihub_v1_APIMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_apihub_v1_APIMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_APIMetadata_descriptor, + new java.lang.String[] { + "Api", "Versions", "OriginalId", "OriginalCreateTime", "OriginalUpdateTime", + }); + internal_static_google_cloud_apihub_v1_VersionMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_apihub_v1_VersionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_VersionMetadata_descriptor, + new java.lang.String[] { + "Version", + "Specs", + "Deployments", + "OriginalId", + "OriginalCreateTime", + "OriginalUpdateTime", + }); + internal_static_google_cloud_apihub_v1_SpecMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_apihub_v1_SpecMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_SpecMetadata_descriptor, + new java.lang.String[] { + "Spec", "OriginalId", "OriginalCreateTime", "OriginalUpdateTime", + }); + internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_apihub_v1_DeploymentMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor, + new java.lang.String[] { + "Deployment", "OriginalId", "OriginalCreateTime", "OriginalUpdateTime", + }); + internal_static_google_cloud_apihub_v1_CollectApiDataResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_apihub_v1_CollectApiDataResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_CollectApiDataResponse_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.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.apihub.v1.CommonFieldsProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectionType.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectionType.java new file mode 100644 index 000000000000..2fb146638303 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CollectionType.java @@ -0,0 +1,183 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The type of the collect request.
    + * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.CollectionType} + */ +public enum CollectionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * The default value. This value is used if the collection type is omitted.
    +   * 
    + * + * COLLECTION_TYPE_UNSPECIFIED = 0; + */ + COLLECTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +   * The collection type is upsert. This should be used when an API is created
    +   * or updated at the source.
    +   * 
    + * + * COLLECTION_TYPE_UPSERT = 1; + */ + COLLECTION_TYPE_UPSERT(1), + /** + * + * + *
    +   * The collection type is delete. This should be used when an API is deleted
    +   * at the source.
    +   * 
    + * + * COLLECTION_TYPE_DELETE = 2; + */ + COLLECTION_TYPE_DELETE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * The default value. This value is used if the collection type is omitted.
    +   * 
    + * + * COLLECTION_TYPE_UNSPECIFIED = 0; + */ + public static final int COLLECTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +   * The collection type is upsert. This should be used when an API is created
    +   * or updated at the source.
    +   * 
    + * + * COLLECTION_TYPE_UPSERT = 1; + */ + public static final int COLLECTION_TYPE_UPSERT_VALUE = 1; + + /** + * + * + *
    +   * The collection type is delete. This should be used when an API is deleted
    +   * at the source.
    +   * 
    + * + * COLLECTION_TYPE_DELETE = 2; + */ + public static final int COLLECTION_TYPE_DELETE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CollectionType 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 CollectionType forNumber(int value) { + switch (value) { + case 0: + return COLLECTION_TYPE_UNSPECIFIED; + case 1: + return COLLECTION_TYPE_UPSERT; + case 2: + return COLLECTION_TYPE_DELETE; + 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 CollectionType findValueByNumber(int number) { + return CollectionType.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.apihub.v1.CollectServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final CollectionType[] VALUES = values(); + + public static CollectionType 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 CollectionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.CollectionType) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CommonFieldsProto.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CommonFieldsProto.java index dd8ea6a1a179..bde8f5266f27 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CommonFieldsProto.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CommonFieldsProto.java @@ -192,6 +192,114 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_apihub_v1_ExternalApi_AttributesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_apihub_v1_ExternalApi_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigValueOption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_Secret_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_Secret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigVariable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_GoogleServiceAccountConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_GoogleServiceAccountConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_AuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_SourceMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_SourceMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_SourceMetadata_PluginInstanceActionSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_SourceMetadata_PluginInstanceActionSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_MatchResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_MatchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_PathParam_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_PathParam_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParam_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParam_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_Header_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_Header_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_HeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_HeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_ResponseCodesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_ResponseCodesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParamsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParamsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -205,7 +313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*google/cloud/apihub/v1/common_fields.p" + "roto\022\026google.cloud.apihub.v1\032\037google/api" + "/field_behavior.proto\032\031google/api/resour" - + "ce.proto\032\037google/protobuf/timestamp.proto\"\365\007\n" + + "ce.proto\032\037google/protobuf/timestamp.proto\"\302\n\n" + "\003Api\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" @@ -230,13 +338,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tapi_style\030\016 \001(\0132" + "\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022?\n" + "\020selected_version\030\017 \001(\tB%\340A\001\372A\037\n" - + "\035apihub.googleapis.com/Version\032Z\n" + + "\035apihub.googleapis.com/Version\022F\n" + + "\020api_requirements\030\020" + + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022\030\n" + + "\013fingerprint\030\021 \001(\tB\003\340A\001\022D\n" + + "\017source_metadata\030\022 \003(\0132&.goog" + + "le.cloud.apihub.v1.SourceMetadataB\003\340A\003\022Q\n" + + "\033api_functional_requirements\030\023 \001(\0132\'.go" + + "ogle.cloud.apihub.v1.AttributeValuesB\003\340A\001\022P\n" + + "\032api_technical_requirements\030\024 \001(\0132\'." + + "google.cloud.apihub.v1.AttributeValuesB\003\340A\001\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" - + "\005value\030\002 \001(\0132\'." - + "google.cloud.apihub.v1.AttributeValues:\0028\001:]\352AZ\n" - + "\031apihub.googleapis.com/Api\0222proj" - + "ects/{project}/locations/{location}/apis/{api}*\004apis2\003api\"\250\010\n" + + "\005value\030\002" + + " \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001:]\352AZ\n" + + "\031apihub.googleapis." + + "com/Api\0222projects/{project}/locations/{location}/apis/{api}*\004apis2\003api\"\356\010\n" + "\007Version\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" @@ -254,27 +371,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\n" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022?\n" - + "\tlifecycle\030\013" - + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022@\n\n" + + "\tlifecycle\030\013 \001(\0132\'.goog" + + "le.cloud.apihub.v1.AttributeValuesB\003\340A\001\022@\n\n" + "compliance\030\014" + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022C\n\r" + "accreditation\030\r" + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022H\n\n" - + "attributes\030\016" - + " \003(\0132/.google.cloud.apihub.v1.Version.AttributesEntryB\003\340A\001\022E\n" + + "attributes\030\016 \003(\0132/.goo" + + "gle.cloud.apihub.v1.Version.AttributesEntryB\003\340A\001\022E\n" + "\023selected_deployment\030\020 \001(\tB(\340A\001\372A\"\n" - + " apihub.googleapis.com/Deployment\032Z\n" + + " apihub.googleapis.com/Deployment\022D\n" + + "\017source_metadata\030\021" + + " \003(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" - + "\005value\030\002 \001(\0132\'.goog" - + "le.cloud.apihub.v1.AttributeValues:\0028\001:|\352Ay\n" - + "\035apihub.googleapis.com/Version\022Eprojects/{project}/locations/{location}/apis" - + "/{api}/versions/{version}*\010versions2\007version\"\256\007\n" + + "\005value\030\002 \001(\0132\'.g" + + "oogle.cloud.apihub.v1.AttributeValues:\0028\001:|\352Ay\n" + + "\035apihub.googleapis.com/Version\022Eprojects/{project}/locations/{location}/a" + + "pis/{api}/versions/{version}*\010versions2\007version\"\364\007\n" + "\004Spec\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022?\n" - + "\tspec_type\030\003 \001(\0132\'" - + ".google.cloud.apihub.v1.AttributeValuesB\003\340A\002\022>\n" + + "\tspec_type\030\003 \001(" + + "\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\002\022>\n" + "\010contents\030\004" + " \001(\0132$.google.cloud.apihub.v1.SpecContentsB\006\340A\001\340A\004\0229\n" + "\007details\030\005" @@ -283,15 +402,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\010" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022@\n\r" - + "lint_response\030\t " - + "\001(\0132$.google.cloud.apihub.v1.LintResponseB\003\340A\001\022E\n\n" + + "lint_response\030\t" + + " \001(\0132$.google.cloud.apihub.v1.LintResponseB\003\340A\001\022E\n\n" + "attributes\030\n" - + " \003(\0132,.google.cloud.apihub.v1.Spec.AttributesEntryB\003\340A\001\022A\n" - + "\r" + + " \003(\0132,.google.cloud.apihub.v1.Spec.AttributesEntryB\003\340A\001\022A\n\r" + "documentation\030\013" + " \001(\0132%.google.cloud.apihub.v1.DocumentationB\003\340A\001\022F\n" + "\014parsing_mode\030\014" - + " \001(\0162(.google.cloud.apihub.v1.Spec.ParsingModeB\006\340A\001\340A\004\032Z\n" + + " \001(\0162(.google.cloud.apihub.v1.Spec.ParsingModeB\006\340A\001\340A\004\022D\n" + + "\017source_metadata\030\r" + + " \003(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" + "\005value\030\002 \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001\"D\n" @@ -299,16 +419,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030PARSING_MODE_UNSPECIFIED\020\000\022\013\n" + "\007RELAXED\020\001\022\n\n" + "\006STRICT\020\002:\200\001\352A}\n" - + "\032apihub.googleapis.com/Spec\022Rprojects/{project}/locatio" - + "ns/{location}/apis/{api}/versions/{version}/specs/{spec}*\005specs2\004spec\"\302\006\n\n" + + "\032apihub.googleapis.com/Spec\022Rprojects/{project}/locations/{loc" + + "ation}/apis/{api}/versions/{version}/specs/{spec}*\005specs2\004spec\"\316\010\n\n" + "Deployment\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" + "\013description\030\003 \001(\tB\003\340A\001\022A\n\r" + "documentation\030\004" + " \001(\0132%.google.cloud.apihub.v1.DocumentationB\003\340A\001\022E\n" - + "\017deployment_type\030\005" - + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\002\022\031\n" + + "\017deployment_type\030\005 \001(" + + "\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\002\022\031\n" + "\014resource_uri\030\006 \001(\tB\003\340A\002\022\026\n" + "\tendpoints\030\007 \003(\tB\003\340A\002\022\031\n" + "\014api_versions\030\010 \003(\tB\003\340A\003\0224\n" @@ -317,34 +437,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0229\n" + "\003slo\030\013" + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022A\n" - + "\013environment\030\014 \001(\013" - + "2\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022K\n\n" + + "\013environment\030\014 \001(\0132\'.goog" + + "le.cloud.apihub.v1.AttributeValuesB\003\340A\001\022K\n\n" + "attributes\030\r" - + " \003(\01322.google.cloud.apihub.v1.Deployment.AttributesEntryB\003\340A\001\032Z\n" + + " \003(\01322.google.cloud.apihub.v1.Deployment.AttributesEntryB\003\340A\001\022D\n" + + "\017source_metadata\030\016" + + " \003(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\022D\n" + + "\016management_url\030\017" + + " \001(\0132\'.google.cloud.apihub.v1.AttributeValuesB\003\340A\001\022@\n\n" + + "source_uri\030\020 \001(\0132\'.g" + + "oogle.cloud.apihub.v1.AttributeValuesB\003\340A\001\022\033\n" + + "\016source_project\030\021 \001(\tB\003\340A\001\022\037\n" + + "\022source_environment\030\022 \001(\tB\003\340A\001\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" - + "\005value\030\002" - + " \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001:\200\001\352A}\n" - + " apihub.googleapis.com/Deployment\022@projects/{project}/loca" - + "tions/{location}/deployments/{deployment}*\013deployments2\n" - + "deployment\"\320\004\n" + + "\005value\030\002 \001(\0132\'.google" + + ".cloud.apihub.v1.AttributeValues:\0028\001:\200\001\352A}\n" + + " apihub.googleapis.com/Deployment\022@pr" + + "ojects/{project}/locations/{location}/deployments/{deployment}*\013deployments2\n" + + "deployment\"\226\005\n" + "\014ApiOperation\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\0220\n" + "\004spec\030\002 \001(\tB\"\340A\003\372A\034\n" + "\032apihub.googleapis.com/Spec\022>\n" + "\007details\030\003" - + " \001(\0132(.google.cloud.apihub.v1.OperationDetailsB\003\340A\003\0224\n" + + " \001(\0132(.google.cloud.apihub.v1.OperationDetailsB\003\340A\001\0224\n" + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\005" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n\n" - + "attributes\030\006 \003(\01324.google.cloud." - + "apihub.v1.ApiOperation.AttributesEntryB\003\340A\001\032Z\n" + + "attributes\030\006" + + " \003(\01324.google.cloud.apihub.v1.ApiOperation.AttributesEntryB\003\340A\001\022D\n" + + "\017source_metadata\030\007" + + " \003(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" + "\005value\030\002" + " \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001:\243\001\352A\237\001\n" - + "\"apihub.googleapis.com/ApiOperation\022\\projects/{project}/l" - + "ocations/{location}/apis/{api}/versions/{version}/operations/{operation}*\r" + + "\"apihub.googleapis.com/ApiOperation\022\\projects/" + + "{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}*\r" + "apiOperations2\014apiOperation\"\256\005\n\n" + "Definition\0225\n" + "\006schema\030\004" @@ -357,31 +487,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\006" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022K\n\n" - + "attributes\030\007 \003(\01322.google.cl" - + "oud.apihub.v1.Definition.AttributesEntryB\003\340A\001\032Z\n" + + "attributes\030\007 \003(\0132" + + "2.google.cloud.apihub.v1.Definition.AttributesEntryB\003\340A\001\032Z\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\0226\n" + "\005value\030\002 \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001\"(\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\n\n" + "\006SCHEMA\020\001:\237\001\352A\233\001\n" - + " apihub.googleapis.com/Definition\022^projects/{project}" - + "/locations/{location}/apis/{api}/version" - + "s/{version}/definitions/{definition}*\013definitions2\n" + + " apihub.googleapis.com/Definition\022^projects/{project}/locations/{location}/apis/{a" + + "pi}/versions/{version}/definitions/{definition}*\013definitions2\n" + "definitionB\007\n" - + "\005value\"\274\010\n" + + "\005value\"\305\010\n" + "\tAttribute\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" + "\013description\030\003 \001(\tB\003\340A\001\022N\n" - + "\017definition_type\030\004" - + " \001(\01620.google.cloud.apihub.v1.Attribute.DefinitionTypeB\003\340A\003\022;\n" + + "\017definition_type\030\004 \001(\01620.googl" + + "e.cloud.apihub.v1.Attribute.DefinitionTypeB\003\340A\003\022;\n" + "\005scope\030\005" + " \001(\0162\'.google.cloud.apihub.v1.Attribute.ScopeB\003\340A\002\022B\n" - + "\tdata_type\030\006 \001(\0162*.g" - + "oogle.cloud.apihub.v1.Attribute.DataTypeB\003\340A\002\022K\n" - + "\016allowed_values\030\007 \003(\0132..google.c" - + "loud.apihub.v1.Attribute.AllowedValueB\003\340A\001\022\030\n" + + "\tdata_type\030\006" + + " \001(\0162*.google.cloud.apihub.v1.Attribute.DataTypeB\003\340A\002\022K\n" + + "\016allowed_values\030\007 \003(\013" + + "2..google.cloud.apihub.v1.Attribute.AllowedValueB\003\340A\001\022\030\n" + "\013cardinality\030\010 \001(\005B\003\340A\001\022\026\n" + "\tmandatory\030\t \001(\010B\003\340A\003\0224\n" + "\013create_time\030\n" @@ -406,26 +535,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "DEPENDENCY\020\006\022\016\n\n" + "DEFINITION\020\007\022\020\n" + "\014EXTERNAL_API\020\010\022\n\n" - + "\006PLUGIN\020\t\"E\n" + + "\006PLUGIN\020\t\"N\n" + "\010DataType\022\031\n" + "\025DATA_TYPE_UNSPECIFIED\020\000\022\010\n" + "\004ENUM\020\001\022\010\n" + "\004JSON\020\002\022\n\n" - + "\006STRING\020\003:{\352Ax\n" - + "\037apihub.googleapis.com/Attribute\022>projects" - + "/{project}/locations/{location}/attributes/{attribute}*\n" + + "\006STRING\020\003\022\007\n" + + "\003URI\020\004:{\352Ax\n" + + "\037apihub.googleapis.com" + + "/Attribute\022>projects/{project}/locations/{location}/attributes/{attribute}*\n" + "attributes2\tattribute\"=\n" + "\014SpecContents\022\025\n" + "\010contents\030\001 \001(\014B\003\340A\002\022\026\n" + "\tmime_type\030\002 \001(\tB\003\340A\002\"\204\001\n" + "\013SpecDetails\022P\n" - + "\025open_api_spec_details\030\002 \001(\0132*.google.clo" - + "ud.apihub.v1.OpenApiSpecDetailsB\003\340A\003H\000\022\030\n" + + "\025open_api_spec_details\030\002" + + " \001(\0132*.google.cloud.apihub.v1.OpenApiSpecDetailsB\003\340A\003H\000\022\030\n" + "\013description\030\001 \001(\tB\003\340A\003B\t\n" + "\007details\"\214\002\n" + "\022OpenApiSpecDetails\022F\n" - + "\006format\030\001 \001(\01621.goo" - + "gle.cloud.apihub.v1.OpenApiSpecDetails.FormatB\003\340A\003\022\024\n" + + "\006format\030\001" + + " \001(\01621.google.cloud.apihub.v1.OpenApiSpecDetails.FormatB\003\340A\003\022\024\n" + "\007version\030\002 \001(\tB\003\340A\003\0221\n" + "\005owner\030\003 \001(\0132\035.google.cloud.apihub.v1.OwnerB\003\340A\003\"e\n" + "\006Format\022\026\n" @@ -436,15 +566,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020OperationDetails\022?\n" + "\016http_operation\030\004" + " \001(\0132%.google.cloud.apihub.v1.HttpOperationH\000\022\030\n" - + "\013description\030\001 \001(\tB\003\340A\003\022A\n\r" - + "documentation\030\002 \001(" - + "\0132%.google.cloud.apihub.v1.DocumentationB\003\340A\003\022\027\n\n" - + "deprecated\030\003 \001(\010B\003\340A\003B\013\n" + + "\013description\030\001 \001(\tB\003\340A\001\022A\n\r" + + "documentation\030\002" + + " \001(\0132%.google.cloud.apihub.v1.DocumentationB\003\340A\001\022\027\n\n" + + "deprecated\030\003 \001(\010B\003\340A\001B\013\n" + "\toperation\"\372\001\n\r" + "HttpOperation\022/\n" - + "\004path\030\001 \001(\0132\034.google.cloud.apihub.v1.PathB\003\340A\003\022A\n" + + "\004path\030\001 \001(\0132\034.google.cloud.apihub.v1.PathB\003\340A\001\022A\n" + "\006method\030\002" - + " \001(\0162,.google.cloud.apihub.v1.HttpOperation.MethodB\003\340A\003\"u\n" + + " \001(\0162,.google.cloud.apihub.v1.HttpOperation.MethodB\003\340A\001\"u\n" + "\006Method\022\026\n" + "\022METHOD_UNSPECIFIED\020\000\022\007\n" + "\003GET\020\001\022\007\n" @@ -456,8 +586,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005PATCH\020\007\022\t\n" + "\005TRACE\020\010\"3\n" + "\004Path\022\021\n" - + "\004path\030\001 \001(\tB\003\340A\003\022\030\n" - + "\013description\030\002 \001(\tB\003\340A\003\";\n" + + "\004path\030\001 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\";\n" + "\006Schema\022\031\n" + "\014display_name\030\001 \001(\tB\003\340A\003\022\026\n" + "\traw_value\030\002 \001(\014B\003\340A\003\"6\n" @@ -465,37 +595,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014display_name\030\001 \001(\tB\003\340A\001\022\022\n" + "\005email\030\002 \001(\tB\003\340A\002\"*\n\r" + "Documentation\022\031\n" - + "\014external_uri\030\001 \001(\tB\003\340A\001\"\342\003\n" + + "\014external_uri\030\001 \001(\tB\003\340A\001\"\267\004\n" + "\017AttributeValues\022R\n" - + "\013enum_values\030\002 \001(\0132;.google" - + ".cloud.apihub.v1.AttributeValues.EnumAttributeValuesH\000\022V\n\r" - + "string_values\030\003 \001(\0132=." - + "google.cloud.apihub.v1.AttributeValues.StringAttributeValuesH\000\022T\n" - + "\013json_values\030\004 " - + "\001(\0132=.google.cloud.apihub.v1.AttributeValues.StringAttributeValuesH\000\022:\n" + + "\013enum_values\030\002" + + " \001(\0132;.google.cloud.apihub.v1.AttributeValues.EnumAttributeValuesH\000\022V\n\r" + + "string_values\030\003 \001(\0132=.google.cloud.apihub." + + "v1.AttributeValues.StringAttributeValuesH\000\022T\n" + + "\013json_values\030\004 \001(\0132=.google.cloud.a" + + "pihub.v1.AttributeValues.StringAttributeValuesH\000\022S\n\n" + + "uri_values\030\005 \001(\0132=.google.cl" + + "oud.apihub.v1.AttributeValues.StringAttributeValuesH\000\022:\n" + "\tattribute\030\001 \001(\tB\'\340A\003\372A!\n" + "\037apihub.googleapis.com/Attribute\032Z\n" + "\023EnumAttributeValues\022C\n" - + "\006values\030\001" - + " \003(\0132..google.cloud.apihub.v1.Attribute.AllowedValueB\003\340A\002\032,\n" + + "\006values\030\001 \003(\0132..googl" + + "e.cloud.apihub.v1.Attribute.AllowedValueB\003\340A\002\032,\n" + "\025StringAttributeValues\022\023\n" + "\006values\030\001 \003(\tB\003\340A\002B\007\n" + "\005Value\"\276\007\n\n" + "Dependency\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022K\n" - + "\010consumer\030\002" - + " \001(\01321.google.cloud.apihub.v1.DependencyEntityReferenceB\006\340A\005\340A\002\022K\n" - + "\010supplier\030\003" - + " \001(\01321.google.cloud.apihub.v1.DependencyEntityReferenceB\006\340A\005\340A\002\022<\n" - + "\005state\030\004 \001(\0162(" - + ".google.cloud.apihub.v1.Dependency.StateB\003\340A\003\022\030\n" + + "\010consumer\030\002 \001(\01321.googl" + + "e.cloud.apihub.v1.DependencyEntityReferenceB\006\340A\005\340A\002\022K\n" + + "\010supplier\030\003 \001(\01321.google.c" + + "loud.apihub.v1.DependencyEntityReferenceB\006\340A\005\340A\002\022<\n" + + "\005state\030\004" + + " \001(\0162(.google.cloud.apihub.v1.Dependency.StateB\003\340A\003\022\030\n" + "\013description\030\005 \001(\tB\003\340A\001\022M\n" - + "\016discovery_mode\030\006" - + " \001(\01620.google.cloud.apihub.v1.Dependency.DiscoveryModeB\003\340A\003\022H\n" - + "\014error_detail\030\007" - + " \001(\0132-.google.cloud.apihub.v1.DependencyErrorDetailB\003\340A\003\0224\n" + + "\016discovery_mode\030\006 \001(\016" + + "20.google.cloud.apihub.v1.Dependency.DiscoveryModeB\003\340A\003\022H\n" + + "\014error_detail\030\007 \001(\0132-." + + "google.cloud.apihub.v1.DependencyErrorDetailB\003\340A\003\0224\n" + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022K\n\n" + + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022K\n" + + "\n" + "attributes\030\n" + " \003(\01322.google.cloud.apihub.v1.Dependency.AttributesEntryB\003\340A\001\032Z\n" + "\017AttributesEntry\022\013\n" @@ -508,8 +641,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "DiscoveryMode\022\036\n" + "\032DISCOVERY_MODE_UNSPECIFIED\020\000\022\n\n" + "\006MANUAL\020\001:\202\001\352A\177\n" - + " apihub.googleapis.com/Dependency\022Aprojects/{proje" - + "ct}/locations/{location}/dependencies/{dependency}*\014dependencies2\n" + + " apihub.googleapis.com/Dependency\022Aprojects/{project}/locations/{" + + "location}/dependencies/{dependency}*\014dependencies2\n" + "dependency\"\215\001\n" + "\031DependencyEntityReference\022!\n" + "\027operation_resource_name\030\002 \001(\tH\000\022$\n" @@ -517,8 +650,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014display_name\030\001 \001(\tB\003\340A\003B\014\n\n" + "identifier\"\345\001\n" + "\025DependencyErrorDetail\022G\n" - + "\005error\030\001 \001(\01623.google.cloud.api" - + "hub.v1.DependencyErrorDetail.ErrorB\003\340A\001\0223\n\n" + + "\005error\030\001" + + " \001(\01623.google.cloud.apihub.v1.DependencyErrorDetail.ErrorB\003\340A\001\0223\n\n" + "error_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\001\"N\n" + "\005Error\022\025\n" + "\021ERROR_UNSPECIFIED\020\000\022\026\n" @@ -526,8 +659,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022SUPPLIER_RECREATED\020\002\"\237\003\n" + "\014LintResponse\0222\n" + "\006issues\030\001 \003(\0132\035.google.cloud.apihub.v1.IssueB\003\340A\001\022G\n" - + "\007summary\030\002" - + " \003(\01321.google.cloud.apihub.v1.LintResponse.SummaryEntryB\003\340A\001\0225\n" + + "\007summary\030\002 " + + "\003(\01321.google.cloud.apihub.v1.LintResponse.SummaryEntryB\003\340A\001\0225\n" + "\005state\030\003 \001(\0162!.google.cloud.apihub.v1.LintStateB\003\340A\002\022\023\n" + "\006source\030\004 \001(\tB\003\340A\002\0223\n" + "\006linter\030\005 \001(\0162\036.google.cloud.apihub.v1.LinterB\003\340A\002\0224\n" @@ -555,21 +688,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" - + "\013api_version\030\007 \001(\tB\003\340A\003\"\363\005\n" + + "\013api_version\030\007 \001(\tB\003\340A\003\"\322\007\n" + "\016ApiHubInstance\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022@\n" - + "\005state\030\004 \001(\0162,.google.c" - + "loud.apihub.v1.ApiHubInstance.StateB\003\340A\003\022\032\n\r" + + "\005state\030\004" + + " \001(\0162,.google.cloud.apihub.v1.ApiHubInstance.StateB\003\340A\003\022\032\n\r" + "state_message\030\005 \001(\tB\003\340A\003\022B\n" - + "\006config\030\006" - + " \001(\0132-.google.cloud.apihub.v1.ApiHubInstance.ConfigB\003\340A\002\022G\n" - + "\006labels\030\007 \003(\01322.googl" - + "e.cloud.apihub.v1.ApiHubInstance.LabelsEntryB\003\340A\001\022\030\n" - + "\013description\030\010 \001(\tB\003\340A\001\032$\n" + + "\006config\030\006 \001(\0132-.google.c" + + "loud.apihub.v1.ApiHubInstance.ConfigB\003\340A\002\022G\n" + + "\006labels\030\007" + + " \003(\01322.google.cloud.apihub.v1.ApiHubInstance.LabelsEntryB\003\340A\001\022\030\n" + + "\013description\030\010 \001(\tB\003\340A\001\032\202\002\n" + "\006Config\022\032\n\r" - + "cmek_key_name\030\001 \001(\tB\003\340A\002\032-\n" + + "cmek_key_name\030\001 \001(\tB\003\340A\001\022\033\n" + + "\016disable_search\030\002 \001(\010B\003\340A\001\022\034\n" + + "\017vertex_location\030\003 \001(\tB\003\340A\001\022Z\n" + + "\017encryption_type\030\004 \001(\0162<.google.cloud.a" + + "pihub.v1.ApiHubInstance.Config.EncryptionTypeB\003\340A\001\"E\n" + + "\016EncryptionType\022\037\n" + + "\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004GMEK\020\001\022\010\n" + + "\004CMEK\020\002\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"n\n" @@ -581,8 +722,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010UPDATING\020\004\022\014\n" + "\010DELETING\020\005\022\n\n" + "\006FAILED\020\006:\227\001\352A\223\001\n" - + "$apihub.googleapis.com/ApiHubInstance\022Jprojects/{project}/locations/{location}/a" - + "piHubInstances/{api_hub_instance}*\017apiHubInstances2\016apiHubInstance\"\344\004\n" + + "$apihub.googleapis.com/ApiHubInstance\022Jprojects/{project}/locations/{loc" + + "ation}/apiHubInstances/{api_hub_instance}*\017apiHubInstances2\016apiHubInstance\"\344\004\n" + "\013ExternalApi\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" @@ -599,9 +740,228 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003key\030\001 \001(\t\0226\n" + "\005value\030\002" + " \001(\0132\'.google.cloud.apihub.v1.AttributeValues:\0028\001:\207\001\352A\203\001\n" - + "!apihub.googleapis.com/ExternalApi\022Cprojects/{pro" - + "ject}/locations/{location}/externalApis/" - + "{external_api}*\014externalApis2\013externalApi*U\n" + + "!apihub.googleapis.com/ExternalApi\022Cprojects/{project}/locations/{location}/exter" + + "nalApis/{external_api}*\014externalApis2\013externalApi\"Y\n" + + "\021ConfigValueOption\022\017\n" + + "\002id\030\001 \001(\tB\003\340A\002\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\"%\n" + + "\006Secret\022\033\n" + + "\016secret_version\030\001 \001(\tB\003\340A\002\"\362\003\n" + + "\026ConfigVariableTemplate\022\017\n" + + "\002id\030\001 \001(\tB\003\340A\002\022Q\n\n" + + "value_type\030\002 " + + "\001(\01628.google.cloud.apihub.v1.ConfigVariableTemplate.ValueTypeB\003\340A\002\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\022\035\n" + + "\020validation_regex\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010required\030\005 \001(\010B\003\340A\001\022D\n" + + "\014enum_options\030\006" + + " \003(\0132).google.cloud.apihub.v1.ConfigValueOptionB\003\340A\001\022L\n" + + "\024multi_select_options\030\007" + + " \003(\0132).google.cloud.apihub.v1.ConfigValueOptionB\003\340A\001\"\217\001\n" + + "\tValueType\022\032\n" + + "\026VALUE_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006STRING\020\001\022\007\n" + + "\003INT\020\002\022\010\n" + + "\004BOOL\020\003\022\n\n" + + "\006SECRET\020\004\022\010\n" + + "\004ENUM\020\005\022\020\n" + + "\014MULTI_SELECT\020\006\022\020\n" + + "\014MULTI_STRING\020\007\022\r\n" + + "\tMULTI_INT\020\010\"\272\005\n" + + "\016ConfigVariable\022\033\n" + + "\014string_value\030\002 \001(\tB\003\340A\001H\000\022\030\n" + + "\tint_value\030\003 \001(\003B\003\340A\001H\000\022\031\n\n" + + "bool_value\030\004 \001(\010B\003\340A\001H\000\022;\n" + + "\014secret_value\030\005 " + + "\001(\0132\036.google.cloud.apihub.v1.SecretB\003\340A\001H\000\022D\n\n" + + "enum_value\030\006" + + " \001(\0132).google.cloud.apihub.v1.ConfigValueOptionB\003\340A\001H\000\022\\\n" + + "\023multi_select_values\030\007 \001(\01328.google.cloud.api" + + "hub.v1.ConfigVariable.MultiSelectValuesB\003\340A\001H\000\022\\\n" + + "\023multi_string_values\030\010 \001(\01328.go" + + "ogle.cloud.apihub.v1.ConfigVariable.MultiStringValuesB\003\340A\001H\000\022V\n" + + "\020multi_int_values\030\t" + + " \001(\01325.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesB\003\340A\001H\000\022\020\n" + + "\003key\030\001 \001(\tB\003\340A\003\032S\n" + + "\021MultiSelectValues\022>\n" + + "\006values\030\001 " + + "\003(\0132).google.cloud.apihub.v1.ConfigValueOptionB\003\340A\001\032(\n" + + "\021MultiStringValues\022\023\n" + + "\006values\030\001 \003(\tB\003\340A\001\032%\n" + + "\016MultiIntValues\022\023\n" + + "\006values\030\001 \003(\005B\003\340A\001B\007\n" + + "\005value\"`\n" + + "\032GoogleServiceAccountConfig\022B\n" + + "\017service_account\030\001 \001(\tB)\340A\002\372A#\n" + + "!iam.googleapis.com/ServiceAccount\"\316\007\n\n" + + "AuthConfig\022[\n" + + "\035google_service_account_config\030\002" + + " \001(\01322.google.cloud.apihub.v1.GoogleServiceAccountConfigH\000\022U\n" + + "\024user_password_config\030\003" + + " \001(\01325.google.cloud.apihub.v1.AuthConfig.UserPasswordConfigH\000\022I\n" + + "\016api_key_config\030\004" + + " \001(\0132/.google.cloud.apihub.v1.AuthConfig.ApiKeyConfigH\000\022l\n" + + " oauth2_client_credentials_config\030\005 \001(\0132@.google" + + ".cloud.apihub.v1.AuthConfig.Oauth2ClientCredentialsConfigH\000\0228\n" + + "\tauth_type\030\001 \001(\0162 .google.cloud.apihub.v1.AuthTypeB\003\340A\002\032b\n" + + "\022UserPasswordConfig\022\025\n" + + "\010username\030\001 \001(\tB\003\340A\002\0225\n" + + "\010password\030\002 \001(\0132\036.google.cloud.apihub.v1.SecretB\003\340A\002\032s\n" + + "\035Oauth2ClientCredentialsConfig\022\026\n" + + "\tclient_id\030\001 \001(\tB\003\340A\002\022:\n\r" + + "client_secret\030\002" + + " \001(\0132\036.google.cloud.apihub.v1.SecretB\003\340A\002\032\265\002\n" + + "\014ApiKeyConfig\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\0224\n" + + "\007api_key\030\002 \001(\0132\036.google.cloud.apihub.v1.SecretB\003\340A\002\022g\n" + + "\025http_element_location\030\003 \001(\0162C.google.cloud.apihub.v1" + + ".AuthConfig.ApiKeyConfig.HttpElementLocationB\003\340A\002\"s\n" + + "\023HttpElementLocation\022%\n" + + "!HTTP_ELEMENT_LOCATION_UNSPECIFIED\020\000\022\t\n" + + "\005QUERY\020\001\022\n\n" + + "\006HEADER\020\002\022\010\n" + + "\004PATH\020\003\022\010\n" + + "\004BODY\020\004\022\n\n" + + "\006COOKIE\020\005B\010\n" + + "\006config\"\277\004\n" + + "\016SourceMetadata\022o\n" + + "\035plugin_instance_action_source\030\001 \001(\0132A.goo" + + "gle.cloud.apihub.v1.SourceMetadata.PluginInstanceActionSourceB\003\340A\003H\000\022K\n" + + "\013source_type\030\002" + + " \001(\01621.google.cloud.apihub.v1.SourceMetadata.SourceTypeB\003\340A\003\022!\n" + + "\024original_resource_id\030\003 \001(\tB\003\340A\003\022F\n" + + "\035original_resource_create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022F\n" + + "\035original_resource_update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032{\n" + + "\032PluginInstanceActionSource\022E\n" + + "\017plugin_instance\030\001 \001(\tB,\340A\003\372A&\n" + + "$apihub.googleapis.com/PluginInstance\022\026\n" + + "\taction_id\030\002 \001(\tB\003\340A\003\"5\n\n" + + "SourceType\022\033\n" + + "\027SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006PLUGIN\020\001B\010\n" + + "\006source\"\220\010\n" + + "\030DiscoveredApiObservation\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022J\n" + + "\005style\030\002 \001(\01626.google.cloud.apihub." + + "v1.DiscoveredApiObservation.StyleB\003\340A\001\022\027", + "\n\n" + + "server_ips\030\003 \003(\tB\003\340A\001\022\025\n" + + "\010hostname\030\004 \001(\tB\003\340A\001\022A\n" + + "\030last_event_detected_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022C\n" + + "\020source_locations\030\006 \003(\tB)\340A\001\372A#\n" + + "!locations.googleapis.com/Location\022 \n" + + "\023api_operation_count\030\007 \001(\003B\003\340A\001\022\023\n" + + "\006origin\030\010 \001(\tB\003\340A\001\022V\n" + + "\014source_types\030\t \003(\0162;.google.cloud.apihu" + + "b.v1.DiscoveredApiObservation.SourceTypeB\003\340A\001\022#\n" + + "\026known_operations_count\030\n" + + " \001(\003B\003\340A\003\022%\n" + + "\030unknown_operations_count\030\013 \001(\003B\003\340A\003\0224\n" + + "\013create_time\030\014 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\r" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022D\n" + + "\017source_metadata\030\016" + + " \001(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\"?\n" + + "\005Style\022\025\n" + + "\021STYLE_UNSPECIFIED\020\000\022\010\n" + + "\004REST\020\001\022\010\n" + + "\004GRPC\020\002\022\013\n" + + "\007GRAPHQL\020\003\"C\n\n" + + "SourceType\022\033\n" + + "\027SOURCE_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007GCP_XLB\020\001\022\013\n" + + "\007GCP_ILB\020\002:\311\001\352A\305\001\n" + + ".apihub.googleapis.com/DiscoveredApiObservation\022^projects/{project}/locations/{" + + "location}/discoveredApiObservations/{discovered_api_observation}*\031discoveredApiO" + + "bservations2\030discoveredApiObservation\"\330\007\n" + + "\026DiscoveredApiOperation\022K\n" + + "\016http_operation\030\002" + + " \001(\0132,.google.cloud.apihub.v1.HttpOperationDetailsB\003\340A\001H\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0228\n" + + "\017first_seen_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\0227\n" + + "\016last_seen_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022\022\n" + + "\005count\030\005 \001(\003B\003\340A\001\022Z\n" + + "\016classification\030\006 \001(\0162" + + "=.google.cloud.apihub.v1.DiscoveredApiOperation.ClassificationB\003\340A\003\022V\n\r" + + "match_results\030\007" + + " \003(\0132:.google.cloud.apihub.v1.DiscoveredApiOperation.MatchResultB\003\340A\003\022D\n" + + "\017source_metadata\030\010" + + " \001(\0132&.google.cloud.apihub.v1.SourceMetadataB\003\340A\003\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032 \n" + + "\013MatchResult\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\"H\n" + + "\016Classification\022\036\n" + + "\032CLASSIFICATION_UNSPECIFIED\020\000\022\t\n" + + "\005KNOWN\020\001\022\013\n" + + "\007UNKNOWN\020\002:\367\001\352A\363\001\n" + + ",apihub.googleapis.com/DiscoveredApiOperation\022\221\001projects/{project}/loca" + + "tions/{location}/discoveredApiObservations/{discovered_api_observation}/discover" + + "edApiOperations/{discovered_api_operatio" + + "n}*\027discoveredApiOperations2\026discoveredApiOperationB\013\n" + + "\toperation\"\244\014\n" + + "\024HttpOperationDetails\022B\n" + + "\016http_operation\030\001" + + " \001(\0132%.google.cloud.apihub.v1.HttpOperationB\003\340A\002\022P\n" + + "\013path_params\030\002 \003(\01326.google.cloud.apihub" + + ".v1.HttpOperationDetails.PathParamB\003\340A\001\022X\n" + + "\014query_params\030\003 \003(\0132=.google.cloud.api" + + "hub.v1.HttpOperationDetails.QueryParamsEntryB\003\340A\001\022N\n" + + "\007request\030\004 \001(\01328.google.clou" + + "d.apihub.v1.HttpOperationDetails.HttpRequestB\003\340A\001\022P\n" + + "\010response\030\005 \001(\01329.google.clo" + + "ud.apihub.v1.HttpOperationDetails.HttpResponseB\003\340A\001\032q\n" + + "\tPathParam\022\025\n" + + "\010position\030\001 \001(\005B\003\340A\001\022M\n" + + "\tdata_type\030\002 \001(\01625.google.clou" + + "d.apihub.v1.HttpOperationDetails.DataTypeB\003\340A\001\032\202\001\n\n" + + "QueryParam\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\022\n" + + "\005count\030\002 \001(\003B\003\340A\001\022M\n" + + "\tdata_type\030\003 \001(\0162" + + "5.google.cloud.apihub.v1.HttpOperationDetails.DataTypeB\003\340A\001\032o\n" + + "\006Header\022\014\n" + + "\004name\030\001 \001(\t\022\r\n" + + "\005count\030\002 \001(\003\022H\n" + + "\tdata_type\030\003 \001(\01625." + + "google.cloud.apihub.v1.HttpOperationDetails.DataType\032\317\001\n" + + "\013HttpRequest\022[\n" + + "\007headers\030\001 \003(\0132E.google.cloud.apihub.v1.HttpOpera" + + "tionDetails.HttpRequest.HeadersEntryB\003\340A\001\032c\n" + + "\014HeadersEntry\022\013\n" + + "\003key\030\001 \001(\t\022B\n" + + "\005value\030\002" + + " \001(\01323.google.cloud.apihub.v1.HttpOperationDetails.Header:\0028\001\032\362\002\n" + + "\014HttpResponse\022\\\n" + + "\007headers\030\001 \003(\0132F.google.cloud.apihub.v" + + "1.HttpOperationDetails.HttpResponse.HeadersEntryB\003\340A\001\022i\n" + + "\016response_codes\030\002 \003(\0132L.google.cloud.apihub.v1.HttpOperationDeta" + + "ils.HttpResponse.ResponseCodesEntryB\003\340A\001\032c\n" + + "\014HeadersEntry\022\013\n" + + "\003key\030\001 \001(\t\022B\n" + + "\005value\030\002" + + " \001(\01323.google.cloud.apihub.v1.HttpOperationDetails.Header:\0028\001\0324\n" + + "\022ResponseCodesEntry\022\013\n" + + "\003key\030\001 \001(\005\022\r\n" + + "\005value\030\002 \001(\003:\0028\001\032k\n" + + "\020QueryParamsEntry\022\013\n" + + "\003key\030\001 \001(\t\022F\n" + + "\005value\030\002 " + + "\001(\01327.google.cloud.apihub.v1.HttpOperationDetails.QueryParam:\0028\001\"]\n" + + "\010DataType\022\031\n" + + "\025DATA_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004BOOL\020\001\022\013\n" + + "\007INTEGER\020\002\022\t\n" + + "\005FLOAT\020\003\022\n\n" + + "\006STRING\020\004\022\010\n" + + "\004UUID\020\005*U\n" + "\tLintState\022\032\n" + "\026LINT_STATE_UNSPECIFIED\020\000\022\026\n" + "\022LINT_STATE_SUCCESS\020\001\022\024\n" @@ -615,13 +975,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016SEVERITY_ERROR\020\001\022\024\n" + "\020SEVERITY_WARNING\020\002\022\021\n\r" + "SEVERITY_INFO\020\003\022\021\n\r" - + "SEVERITY_HINT\020\004B\233\002\n" - + "\032com.google.cloud.apihub.v1B\021CommonFieldsProtoP\001Z2c" - + "loud.google.com/go/apihub/apiv1/apihubpb" - + ";apihubpb\252\002\026Google.Cloud.ApiHub.V1\312\002\026Goo" - + "gle\\Cloud\\ApiHub\\V1\352\002\031Google::Cloud::ApiHub::V1\352Ae\n" - + "#aiplatform.googleapis.com/Extension\022>projects/{project}/locations/{l" - + "ocation}/extensions/{extension}b\006proto3" + + "SEVERITY_HINT\020\004*\215\001\n" + + "\010AuthType\022\031\n" + + "\025AUTH_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007NO_AUTH\020\001\022\032\n" + + "\026GOOGLE_SERVICE_ACCOUNT\020\002\022\021\n\r" + + "USER_PASSWORD\020\003\022\013\n" + + "\007API_KEY\020\004\022\035\n" + + "\031OAUTH2_CLIENT_CREDENTIALS\020\005*T\n" + + "\016PluginCategory\022\037\n" + + "\033PLUGIN_CATEGORY_UNSPECIFIED\020\000\022\017\n" + + "\013API_GATEWAY\020\001\022\020\n" + + "\014API_PRODUCER\020\002B\367\002\n" + + "\032com.google.cloud.apihub.v1B\021CommonFieldsProtoP\001Z2cloud.google." + + "com/go/apihub/apiv1/apihubpb;apihubpb\252\002\026" + + "Google.Cloud.ApiHub.V1\312\002\026Google\\Cloud\\ApiHub\\V1\352\002\031Google::Cloud::ApiHub::V1\352Ae\n" + + "#aiplatform.googleapis.com/Extension\022>pro" + + "jects/{project}/locations/{location}/extensions/{extension}\352AY\n" + + "!iam.googleapis.com/ServiceAccount\0224projects/{project}/se" + + "rviceAccounts/{service_account}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -652,6 +1024,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Attributes", "ApiStyle", "SelectedVersion", + "ApiRequirements", + "Fingerprint", + "SourceMetadata", + "ApiFunctionalRequirements", + "ApiTechnicalRequirements", }); internal_static_google_cloud_apihub_v1_Api_AttributesEntry_descriptor = internal_static_google_cloud_apihub_v1_Api_descriptor.getNestedTypes().get(0); @@ -682,6 +1059,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Accreditation", "Attributes", "SelectedDeployment", + "SourceMetadata", }); internal_static_google_cloud_apihub_v1_Version_AttributesEntry_descriptor = internal_static_google_cloud_apihub_v1_Version_descriptor.getNestedTypes().get(0); @@ -709,6 +1087,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Attributes", "Documentation", "ParsingMode", + "SourceMetadata", }); internal_static_google_cloud_apihub_v1_Spec_AttributesEntry_descriptor = internal_static_google_cloud_apihub_v1_Spec_descriptor.getNestedTypes().get(0); @@ -737,6 +1116,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Slo", "Environment", "Attributes", + "SourceMetadata", + "ManagementUrl", + "SourceUri", + "SourceProject", + "SourceEnvironment", }); internal_static_google_cloud_apihub_v1_Deployment_AttributesEntry_descriptor = internal_static_google_cloud_apihub_v1_Deployment_descriptor.getNestedTypes().get(0); @@ -752,7 +1136,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ApiOperation_descriptor, new java.lang.String[] { - "Name", "Spec", "Details", "CreateTime", "UpdateTime", "Attributes", + "Name", "Spec", "Details", "CreateTime", "UpdateTime", "Attributes", "SourceMetadata", }); internal_static_google_cloud_apihub_v1_ApiOperation_AttributesEntry_descriptor = internal_static_google_cloud_apihub_v1_ApiOperation_descriptor.getNestedTypes().get(0); @@ -882,7 +1266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_AttributeValues_descriptor, new java.lang.String[] { - "EnumValues", "StringValues", "JsonValues", "Attribute", "Value", + "EnumValues", "StringValues", "JsonValues", "UriValues", "Attribute", "Value", }); internal_static_google_cloud_apihub_v1_AttributeValues_EnumAttributeValues_descriptor = internal_static_google_cloud_apihub_v1_AttributeValues_descriptor.getNestedTypes().get(0); @@ -1016,7 +1400,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_apihub_v1_ApiHubInstance_Config_descriptor, new java.lang.String[] { - "CmekKeyName", + "CmekKeyName", "DisableSearch", "VertexLocation", "EncryptionType", }); internal_static_google_cloud_apihub_v1_ApiHubInstance_LabelsEntry_descriptor = internal_static_google_cloud_apihub_v1_ApiHubInstance_descriptor.getNestedTypes().get(1); @@ -1050,6 +1434,290 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_apihub_v1_ConfigValueOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "Description", + }); + internal_static_google_cloud_apihub_v1_Secret_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_apihub_v1_Secret_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_Secret_descriptor, + new java.lang.String[] { + "SecretVersion", + }); + internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor, + new java.lang.String[] { + "Id", + "ValueType", + "Description", + "ValidationRegex", + "Required", + "EnumOptions", + "MultiSelectOptions", + }); + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_apihub_v1_ConfigVariable_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor, + new java.lang.String[] { + "StringValue", + "IntValue", + "BoolValue", + "SecretValue", + "EnumValue", + "MultiSelectValues", + "MultiStringValues", + "MultiIntValues", + "Key", + "Value", + }); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor = + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor = + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor = + internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor, + new java.lang.String[] { + "Values", + }); + internal_static_google_cloud_apihub_v1_GoogleServiceAccountConfig_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_apihub_v1_GoogleServiceAccountConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_GoogleServiceAccountConfig_descriptor, + new java.lang.String[] { + "ServiceAccount", + }); + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_apihub_v1_AuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor, + new java.lang.String[] { + "GoogleServiceAccountConfig", + "UserPasswordConfig", + "ApiKeyConfig", + "Oauth2ClientCredentialsConfig", + "AuthType", + "Config", + }); + internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor = + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_AuthConfig_UserPasswordConfig_descriptor, + new java.lang.String[] { + "Username", "Password", + }); + internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor = + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_AuthConfig_Oauth2ClientCredentialsConfig_descriptor, + new java.lang.String[] { + "ClientId", "ClientSecret", + }); + internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor = + internal_static_google_cloud_apihub_v1_AuthConfig_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_AuthConfig_ApiKeyConfig_descriptor, + new java.lang.String[] { + "Name", "ApiKey", "HttpElementLocation", + }); + internal_static_google_cloud_apihub_v1_SourceMetadata_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_apihub_v1_SourceMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_SourceMetadata_descriptor, + new java.lang.String[] { + "PluginInstanceActionSource", + "SourceType", + "OriginalResourceId", + "OriginalResourceCreateTime", + "OriginalResourceUpdateTime", + "Source", + }); + internal_static_google_cloud_apihub_v1_SourceMetadata_PluginInstanceActionSource_descriptor = + internal_static_google_cloud_apihub_v1_SourceMetadata_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_apihub_v1_SourceMetadata_PluginInstanceActionSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_SourceMetadata_PluginInstanceActionSource_descriptor, + new java.lang.String[] { + "PluginInstance", "ActionId", + }); + internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_descriptor, + new java.lang.String[] { + "Name", + "Style", + "ServerIps", + "Hostname", + "LastEventDetectedTime", + "SourceLocations", + "ApiOperationCount", + "Origin", + "SourceTypes", + "KnownOperationsCount", + "UnknownOperationsCount", + "CreateTime", + "UpdateTime", + "SourceMetadata", + }); + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_descriptor, + new java.lang.String[] { + "HttpOperation", + "Name", + "FirstSeenTime", + "LastSeenTime", + "Count", + "Classification", + "MatchResults", + "SourceMetadata", + "CreateTime", + "UpdateTime", + "Operation", + }); + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_MatchResult_descriptor = + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_MatchResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DiscoveredApiOperation_MatchResult_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor, + new java.lang.String[] { + "HttpOperation", "PathParams", "QueryParams", "Request", "Response", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_PathParam_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_PathParam_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_PathParam_descriptor, + new java.lang.String[] { + "Position", "DataType", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParam_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParam_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParam_descriptor, + new java.lang.String[] { + "Name", "Count", "DataType", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_Header_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_Header_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_Header_descriptor, + new java.lang.String[] { + "Name", "Count", "DataType", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_descriptor, + new java.lang.String[] { + "Headers", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_HeadersEntry_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_HeadersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpRequest_HeadersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_descriptor, + new java.lang.String[] { + "Headers", "ResponseCodes", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_HeadersEntry_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_HeadersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_HeadersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_ResponseCodesEntry_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_ResponseCodesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_HttpResponse_ResponseCodesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParamsEntry_descriptor = + internal_static_google_cloud_apihub_v1_HttpOperationDetails_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParamsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_HttpOperationDetails_QueryParamsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOption.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOption.java new file mode 100644 index 000000000000..874eec083fa9 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOption.java @@ -0,0 +1,1013 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * ConfigValueOption represents an option for a config variable of type enum or
    + * multi select.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigValueOption} + */ +public final class ConfigValueOption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigValueOption) + ConfigValueOptionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ConfigValueOption.newBuilder() to construct. + private ConfigValueOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigValueOption() { + id_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigValueOption(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigValueOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigValueOption.class, + com.google.cloud.apihub.v1.ConfigValueOption.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + + /** + * + * + *
    +   * Required. Id of the option.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. Id of the option.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
    +   * Required. Display name of the option.
    +   * 
    + * + * 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. Display name of the option.
    +   * 
    + * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
    +   * Optional. Description of the option.
    +   * 
    + * + * 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 option.
    +   * 
    + * + * 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + 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_); + } + 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(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + 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_); + } + 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.apihub.v1.ConfigValueOption)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigValueOption other = + (com.google.cloud.apihub.v1.ConfigValueOption) obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption 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.apihub.v1.ConfigValueOption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom( + 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.apihub.v1.ConfigValueOption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom( + java.io.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.apihub.v1.ConfigValueOption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseDelimitedFrom( + java.io.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.apihub.v1.ConfigValueOption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigValueOption prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * ConfigValueOption represents an option for a config variable of type enum or
    +   * multi select.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigValueOption} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigValueOption) + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigValueOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigValueOption.class, + com.google.cloud.apihub.v1.ConfigValueOption.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigValueOption.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + displayName_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigValueOption_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption build() { + com.google.cloud.apihub.v1.ConfigValueOption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption buildPartial() { + com.google.cloud.apihub.v1.ConfigValueOption result = + new com.google.cloud.apihub.v1.ConfigValueOption(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.ConfigValueOption result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigValueOption) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigValueOption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigValueOption other) { + if (other == com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object id_ = ""; + + /** + * + * + *
    +     * Required. Id of the option.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. Id of the option.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. Id of the option.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Id of the option.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Id of the option.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
    +     * Required. Display name of the option.
    +     * 
    + * + * 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. Display name of the option.
    +     * 
    + * + * 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. Display name of the option.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Display name of the option.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Display name of the option.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
    +     * Optional. Description of the option.
    +     * 
    + * + * 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 option.
    +     * 
    + * + * 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 option.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Description of the option.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Description of the option.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + 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.apihub.v1.ConfigValueOption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigValueOption) + private static final com.google.cloud.apihub.v1.ConfigValueOption DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigValueOption(); + } + + public static com.google.cloud.apihub.v1.ConfigValueOption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigValueOption 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.apihub.v1.ConfigValueOption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOptionOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOptionOrBuilder.java new file mode 100644 index 000000000000..e114178f428f --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigValueOptionOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ConfigValueOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigValueOption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Id of the option.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + + /** + * + * + *
    +   * Required. Id of the option.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
    +   * Required. Display name of the option.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
    +   * Required. Display name of the option.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Optional. Description of the option.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
    +   * Optional. Description of the option.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariable.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariable.java new file mode 100644 index 000000000000..307b1428556e --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariable.java @@ -0,0 +1,5590 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * ConfigVariable represents a additional configuration variable present in a
    + * PluginInstance Config or AuthConfig, based on a ConfigVariableTemplate.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable} + */ +public final class ConfigVariable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigVariable) + ConfigVariableOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ConfigVariable.newBuilder() to construct. + private ConfigVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigVariable() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigVariable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.class, + com.google.cloud.apihub.v1.ConfigVariable.Builder.class); + } + + public interface MultiSelectValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getValuesList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOption getValues(int index); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getValuesCount(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getValuesOrBuilderList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getValuesOrBuilder(int index); + } + + /** + * + * + *
    +   * The config variable value of data type multi select.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiSelectValues} + */ + public static final class MultiSelectValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) + MultiSelectValuesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MultiSelectValues.newBuilder() to construct. + private MultiSelectValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiSelectValues() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiSelectValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List values_; + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi select.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getValuesOrBuilder(int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i)); + } + size += 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.apihub.v1.ConfigVariable.MultiSelectValues)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues other = + (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues 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.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + 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.apihub.v1.ConfigVariable.MultiSelectValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + java.io.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.apihub.v1.ConfigVariable.MultiSelectValues parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseDelimitedFrom( + java.io.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.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigVariable.MultiSelectValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * The config variable value of data type multi select.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiSelectValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiSelectValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues build() { + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues buildPartial() { + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues result = + new com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigVariable.MultiSelectValues) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues other) { + if (other + == com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance()) + return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.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.apihub.v1.ConfigValueOption m = + input.readMessage( + com.google.cloud.apihub.v1.ConfigValueOption.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + 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 int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + valuesBuilder_; + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setValues(int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setValues( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addValues(com.google.cloud.apihub.v1.ConfigValueOption value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addValues(int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addValues( + com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addValues( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi select.
    +       * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder>( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) + private static final com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues(); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiSelectValues 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.apihub.v1.ConfigVariable.MultiSelectValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MultiStringValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigVariable.MultiStringValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + int getValuesCount(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + } + + /** + * + * + *
    +   * The config variable value of data type multi string.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiStringValues} + */ + public static final class MultiStringValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigVariable.MultiStringValues) + MultiStringValuesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MultiStringValues.newBuilder() to construct. + private MultiStringValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiStringValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiStringValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi string.
    +     * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().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.apihub.v1.ConfigVariable.MultiStringValues)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues other = + (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues 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.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + 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.apihub.v1.ConfigVariable.MultiStringValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + java.io.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.apihub.v1.ConfigVariable.MultiStringValues parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseDelimitedFrom( + java.io.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.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigVariable.MultiStringValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * The config variable value of data type multi string.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiStringValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigVariable.MultiStringValues) + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiStringValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues build() { + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues buildPartial() { + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues result = + new com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigVariable.MultiStringValues) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues other) { + if (other + == com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance()) + return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + 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 int bitField0_; + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi string.
    +       * 
    + * + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.ConfigVariable.MultiStringValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigVariable.MultiStringValues) + private static final com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues(); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiStringValues 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.apihub.v1.ConfigVariable.MultiStringValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MultiIntValuesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigVariable.MultiIntValues) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + int getValuesCount(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + int getValues(int index); + } + + /** + * + * + *
    +   * The config variable value of data type multi int.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiIntValues} + */ + public static final class MultiIntValues extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigVariable.MultiIntValues) + MultiIntValuesOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MultiIntValues.newBuilder() to construct. + private MultiIntValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiIntValues() { + values_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiIntValues(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList values_ = emptyIntList(); + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +     * Optional. The config variable value of data type multi int.
    +     * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public int getValues(int index) { + return values_.getInt(index); + } + + private int valuesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getValuesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valuesMemoizedSerializedSize); + } + for (int i = 0; i < values_.size(); i++) { + output.writeInt32NoTag(values_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(values_.getInt(i)); + } + size += dataSize; + if (!getValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + valuesMemoizedSerializedSize = dataSize; + } + 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.apihub.v1.ConfigVariable.MultiIntValues)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues other = + (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) obj; + + if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues 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.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + 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.apihub.v1.ConfigVariable.MultiIntValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + java.io.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.apihub.v1.ConfigVariable.MultiIntValues parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseDelimitedFrom( + java.io.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.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigVariable.MultiIntValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * The config variable value of data type multi int.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable.MultiIntValues} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigVariable.MultiIntValues) + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.class, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_MultiIntValues_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues build() { + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues buildPartial() { + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues result = + new com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigVariable.MultiIntValues) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues other) { + if (other == com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance()) + return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + values_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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 8: + { + int v = input.readInt32(); + ensureValuesIsMutable(); + values_.addInt(v); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureValuesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + values_.addInt(input.readInt32()); + } + input.popLimit(limit); + 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 int bitField0_; + + private com.google.protobuf.Internal.IntList values_ = emptyIntList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public java.util.List getValuesList() { + values_.makeImmutable(); + return values_; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public int getValues(int index) { + return values_.getInt(index); + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, int value) { + + ensureValuesIsMutable(); + values_.setInt(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(int value) { + + ensureValuesIsMutable(); + values_.addInt(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Optional. The config variable value of data type multi int.
    +       * 
    + * + * repeated int32 values = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.ConfigVariable.MultiIntValues) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigVariable.MultiIntValues) + private static final com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues(); + } + + public static com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiIntValues 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.apihub.v1.ConfigVariable.MultiIntValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(2), + INT_VALUE(3), + BOOL_VALUE(4), + SECRET_VALUE(5), + ENUM_VALUE(6), + MULTI_SELECT_VALUES(7), + MULTI_STRING_VALUES(8), + MULTI_INT_VALUES(9), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: + return STRING_VALUE; + case 3: + return INT_VALUE; + case 4: + return BOOL_VALUE; + case 5: + return SECRET_VALUE; + case 6: + return ENUM_VALUE; + case 7: + return MULTI_SELECT_VALUES; + case 8: + return MULTI_STRING_VALUES; + case 9: + return MULTI_INT_VALUES; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int STRING_VALUE_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return valueCase_ == 2; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INT_VALUE_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * integer.
    +   * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intValue field is set. + */ + @java.lang.Override + public boolean hasIntValue() { + return valueCase_ == 3; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * integer.
    +   * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intValue. + */ + @java.lang.Override + public long getIntValue() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * boolean.
    +   * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueCase_ == 4; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * boolean.
    +   * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (valueCase_ == 4) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int SECRET_VALUE_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the secretValue field is set. + */ + @java.lang.Override + public boolean hasSecretValue() { + return valueCase_ == 5; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The secretValue. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Secret getSecretValue() { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.Secret) value_; + } + return com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SecretOrBuilder getSecretValueOrBuilder() { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.Secret) value_; + } + return com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } + + public static final int ENUM_VALUE_FIELD_NUMBER = 6; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enumValue field is set. + */ + @java.lang.Override + public boolean hasEnumValue() { + return valueCase_ == 6; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enumValue. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getEnumValue() { + if (valueCase_ == 6) { + return (com.google.cloud.apihub.v1.ConfigValueOption) value_; + } + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumValueOrBuilder() { + if (valueCase_ == 6) { + return (com.google.cloud.apihub.v1.ConfigValueOption) value_; + } + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + + public static final int MULTI_SELECT_VALUES_FIELD_NUMBER = 7; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiSelectValues field is set. + */ + @java.lang.Override + public boolean hasMultiSelectValues() { + return valueCase_ == 7; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiSelectValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues getMultiSelectValues() { + if (valueCase_ == 7) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder + getMultiSelectValuesOrBuilder() { + if (valueCase_ == 7) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + + public static final int MULTI_STRING_VALUES_FIELD_NUMBER = 8; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiStringValues field is set. + */ + @java.lang.Override + public boolean hasMultiStringValues() { + return valueCase_ == 8; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiStringValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues getMultiStringValues() { + if (valueCase_ == 8) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder + getMultiStringValuesOrBuilder() { + if (valueCase_ == 8) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + + public static final int MULTI_INT_VALUES_FIELD_NUMBER = 9; + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiIntValues field is set. + */ + @java.lang.Override + public boolean hasMultiIntValues() { + return valueCase_ == 9; + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiIntValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues getMultiIntValues() { + if (valueCase_ == 9) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder + getMultiIntValuesOrBuilder() { + if (valueCase_ == 9) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
    +   * Output only. Key will be the
    +   * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +   * the config variable.
    +   * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + + /** + * + * + *
    +   * Output only. Key will be the
    +   * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +   * the config variable.
    +   * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (valueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (valueCase_ == 3) { + output.writeInt64(3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 5) { + output.writeMessage(5, (com.google.cloud.apihub.v1.Secret) value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (com.google.cloud.apihub.v1.ConfigValueOption) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_); + } + if (valueCase_ == 8) { + output.writeMessage(8, (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_); + } + if (valueCase_ == 9) { + output.writeMessage(9, (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_); + } + 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(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (valueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.apihub.v1.Secret) value_); + } + if (valueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.apihub.v1.ConfigValueOption) value_); + } + if (valueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_); + } + if (valueCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_); + } + if (valueCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_); + } + 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.apihub.v1.ConfigVariable)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigVariable other = + (com.google.cloud.apihub.v1.ConfigVariable) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 3: + if (getIntValue() != other.getIntValue()) return false; + break; + case 4: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 5: + if (!getSecretValue().equals(other.getSecretValue())) return false; + break; + case 6: + if (!getEnumValue().equals(other.getEnumValue())) return false; + break; + case 7: + if (!getMultiSelectValues().equals(other.getMultiSelectValues())) return false; + break; + case 8: + if (!getMultiStringValues().equals(other.getMultiStringValues())) return false; + break; + case 9: + if (!getMultiIntValues().equals(other.getMultiIntValues())) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + switch (valueCase_) { + case 2: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 3: + hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue()); + break; + case 4: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 5: + hash = (37 * hash) + SECRET_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getSecretValue().hashCode(); + break; + case 6: + hash = (37 * hash) + ENUM_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getEnumValue().hashCode(); + break; + case 7: + hash = (37 * hash) + MULTI_SELECT_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMultiSelectValues().hashCode(); + break; + case 8: + hash = (37 * hash) + MULTI_STRING_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMultiStringValues().hashCode(); + break; + case 9: + hash = (37 * hash) + MULTI_INT_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMultiIntValues().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable 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.apihub.v1.ConfigVariable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom( + 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.apihub.v1.ConfigVariable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom( + java.io.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.apihub.v1.ConfigVariable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseDelimitedFrom( + java.io.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.apihub.v1.ConfigVariable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigVariable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * ConfigVariable represents a additional configuration variable present in a
    +   * PluginInstance Config or AuthConfig, based on a ConfigVariableTemplate.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigVariable) + com.google.cloud.apihub.v1.ConfigVariableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariable.class, + com.google.cloud.apihub.v1.ConfigVariable.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigVariable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (secretValueBuilder_ != null) { + secretValueBuilder_.clear(); + } + if (enumValueBuilder_ != null) { + enumValueBuilder_.clear(); + } + if (multiSelectValuesBuilder_ != null) { + multiSelectValuesBuilder_.clear(); + } + if (multiStringValuesBuilder_ != null) { + multiStringValuesBuilder_.clear(); + } + if (multiIntValuesBuilder_ != null) { + multiIntValuesBuilder_.clear(); + } + key_ = ""; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariable_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigVariable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable build() { + com.google.cloud.apihub.v1.ConfigVariable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable buildPartial() { + com.google.cloud.apihub.v1.ConfigVariable result = + new com.google.cloud.apihub.v1.ConfigVariable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.ConfigVariable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.key_ = key_; + } + } + + private void buildPartialOneofs(com.google.cloud.apihub.v1.ConfigVariable result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 5 && secretValueBuilder_ != null) { + result.value_ = secretValueBuilder_.build(); + } + if (valueCase_ == 6 && enumValueBuilder_ != null) { + result.value_ = enumValueBuilder_.build(); + } + if (valueCase_ == 7 && multiSelectValuesBuilder_ != null) { + result.value_ = multiSelectValuesBuilder_.build(); + } + if (valueCase_ == 8 && multiStringValuesBuilder_ != null) { + result.value_ = multiStringValuesBuilder_.build(); + } + if (valueCase_ == 9 && multiIntValuesBuilder_ != null) { + result.value_ = multiIntValuesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigVariable) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigVariable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigVariable other) { + if (other == com.google.cloud.apihub.v1.ConfigVariable.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000100; + onChanged(); + } + switch (other.getValueCase()) { + case STRING_VALUE: + { + valueCase_ = 2; + value_ = other.value_; + onChanged(); + break; + } + case INT_VALUE: + { + setIntValue(other.getIntValue()); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case SECRET_VALUE: + { + mergeSecretValue(other.getSecretValue()); + break; + } + case ENUM_VALUE: + { + mergeEnumValue(other.getEnumValue()); + break; + } + case MULTI_SELECT_VALUES: + { + mergeMultiSelectValues(other.getMultiSelectValues()); + break; + } + case MULTI_STRING_VALUES: + { + mergeMultiStringValues(other.getMultiStringValues()); + break; + } + case MULTI_INT_VALUES: + { + mergeMultiIntValues(other.getMultiIntValues()); + break; + } + case VALUE_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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 2; + value_ = s; + break; + } // case 18 + case 24: + { + value_ = input.readInt64(); + valueCase_ = 3; + break; + } // case 24 + case 32: + { + value_ = input.readBool(); + valueCase_ = 4; + break; + } // case 32 + case 42: + { + input.readMessage(getSecretValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getEnumValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getMultiSelectValuesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getMultiStringValuesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getMultiIntValuesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 9; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return valueCase_ == 2; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * string.
    +     * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * integer.
    +     * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intValue field is set. + */ + public boolean hasIntValue() { + return valueCase_ == 3; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * integer.
    +     * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intValue. + */ + public long getIntValue() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * integer.
    +     * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The intValue to set. + * @return This builder for chaining. + */ + public Builder setIntValue(long value) { + + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * integer.
    +     * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIntValue() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * boolean.
    +     * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return valueCase_ == 4; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * boolean.
    +     * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (valueCase_ == 4) { + return (java.lang.Boolean) value_; + } + return false; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * boolean.
    +     * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * boolean.
    +     * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + secretValueBuilder_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the secretValue field is set. + */ + @java.lang.Override + public boolean hasSecretValue() { + return valueCase_ == 5; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The secretValue. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Secret getSecretValue() { + if (secretValueBuilder_ == null) { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.Secret) value_; + } + return com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } else { + if (valueCase_ == 5) { + return secretValueBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSecretValue(com.google.cloud.apihub.v1.Secret value) { + if (secretValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + secretValueBuilder_.setMessage(value); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSecretValue(com.google.cloud.apihub.v1.Secret.Builder builderForValue) { + if (secretValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + secretValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSecretValue(com.google.cloud.apihub.v1.Secret value) { + if (secretValueBuilder_ == null) { + if (valueCase_ == 5 && value_ != com.google.cloud.apihub.v1.Secret.getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.Secret.newBuilder( + (com.google.cloud.apihub.v1.Secret) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 5) { + secretValueBuilder_.mergeFrom(value); + } else { + secretValueBuilder_.setMessage(value); + } + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSecretValue() { + if (secretValueBuilder_ == null) { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + } + secretValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.Secret.Builder getSecretValueBuilder() { + return getSecretValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SecretOrBuilder getSecretValueOrBuilder() { + if ((valueCase_ == 5) && (secretValueBuilder_ != null)) { + return secretValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 5) { + return (com.google.cloud.apihub.v1.Secret) value_; + } + return com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * secret.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder> + getSecretValueFieldBuilder() { + if (secretValueBuilder_ == null) { + if (!(valueCase_ == 5)) { + value_ = com.google.cloud.apihub.v1.Secret.getDefaultInstance(); + } + secretValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Secret, + com.google.cloud.apihub.v1.Secret.Builder, + com.google.cloud.apihub.v1.SecretOrBuilder>( + (com.google.cloud.apihub.v1.Secret) value_, getParentForChildren(), isClean()); + value_ = null; + } + valueCase_ = 5; + onChanged(); + return secretValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + enumValueBuilder_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enumValue field is set. + */ + @java.lang.Override + public boolean hasEnumValue() { + return valueCase_ == 6; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enumValue. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getEnumValue() { + if (enumValueBuilder_ == null) { + if (valueCase_ == 6) { + return (com.google.cloud.apihub.v1.ConfigValueOption) value_; + } + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return enumValueBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnumValue(com.google.cloud.apihub.v1.ConfigValueOption value) { + if (enumValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + enumValueBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnumValue( + com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (enumValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + enumValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEnumValue(com.google.cloud.apihub.v1.ConfigValueOption value) { + if (enumValueBuilder_ == null) { + if (valueCase_ == 6 + && value_ != com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.ConfigValueOption.newBuilder( + (com.google.cloud.apihub.v1.ConfigValueOption) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + enumValueBuilder_.mergeFrom(value); + } else { + enumValueBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEnumValue() { + if (enumValueBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + enumValueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder getEnumValueBuilder() { + return getEnumValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumValueOrBuilder() { + if ((valueCase_ == 6) && (enumValueBuilder_ != null)) { + return enumValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (com.google.cloud.apihub.v1.ConfigValueOption) value_; + } + return com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * enum.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + getEnumValueFieldBuilder() { + if (enumValueBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance(); + } + enumValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder>( + (com.google.cloud.apihub.v1.ConfigValueOption) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged(); + return enumValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder> + multiSelectValuesBuilder_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiSelectValues field is set. + */ + @java.lang.Override + public boolean hasMultiSelectValues() { + return valueCase_ == 7; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiSelectValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues getMultiSelectValues() { + if (multiSelectValuesBuilder_ == null) { + if (valueCase_ == 7) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return multiSelectValuesBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiSelectValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues value) { + if (multiSelectValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + multiSelectValuesBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiSelectValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder builderForValue) { + if (multiSelectValuesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + multiSelectValuesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultiSelectValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues value) { + if (multiSelectValuesBuilder_ == null) { + if (valueCase_ == 7 + && value_ + != com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues + .getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.newBuilder( + (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + multiSelectValuesBuilder_.mergeFrom(value); + } else { + multiSelectValuesBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMultiSelectValues() { + if (multiSelectValuesBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + multiSelectValuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder + getMultiSelectValuesBuilder() { + return getMultiSelectValuesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder + getMultiSelectValuesOrBuilder() { + if ((valueCase_ == 7) && (multiSelectValuesBuilder_ != null)) { + return multiSelectValuesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi select.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder> + getMultiSelectValuesFieldBuilder() { + if (multiSelectValuesBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.getDefaultInstance(); + } + multiSelectValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder>( + (com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged(); + return multiSelectValuesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder> + multiStringValuesBuilder_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiStringValues field is set. + */ + @java.lang.Override + public boolean hasMultiStringValues() { + return valueCase_ == 8; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiStringValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues getMultiStringValues() { + if (multiStringValuesBuilder_ == null) { + if (valueCase_ == 8) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } else { + if (valueCase_ == 8) { + return multiStringValuesBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiStringValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues value) { + if (multiStringValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + multiStringValuesBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiStringValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder builderForValue) { + if (multiStringValuesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + multiStringValuesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultiStringValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues value) { + if (multiStringValuesBuilder_ == null) { + if (valueCase_ == 8 + && value_ + != com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues + .getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.newBuilder( + (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 8) { + multiStringValuesBuilder_.mergeFrom(value); + } else { + multiStringValuesBuilder_.setMessage(value); + } + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMultiStringValues() { + if (multiStringValuesBuilder_ == null) { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + } + multiStringValuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder + getMultiStringValuesBuilder() { + return getMultiStringValuesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder + getMultiStringValuesOrBuilder() { + if ((valueCase_ == 8) && (multiStringValuesBuilder_ != null)) { + return multiStringValuesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 8) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi string.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder> + getMultiStringValuesFieldBuilder() { + if (multiStringValuesBuilder_ == null) { + if (!(valueCase_ == 8)) { + value_ = com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.getDefaultInstance(); + } + multiStringValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder>( + (com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 8; + onChanged(); + return multiStringValuesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder> + multiIntValuesBuilder_; + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiIntValues field is set. + */ + @java.lang.Override + public boolean hasMultiIntValues() { + return valueCase_ == 9; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiIntValues. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues getMultiIntValues() { + if (multiIntValuesBuilder_ == null) { + if (valueCase_ == 9) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } else { + if (valueCase_ == 9) { + return multiIntValuesBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiIntValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues value) { + if (multiIntValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + multiIntValuesBuilder_.setMessage(value); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiIntValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder builderForValue) { + if (multiIntValuesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + multiIntValuesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultiIntValues( + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues value) { + if (multiIntValuesBuilder_ == null) { + if (valueCase_ == 9 + && value_ + != com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance()) { + value_ = + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.newBuilder( + (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 9) { + multiIntValuesBuilder_.mergeFrom(value); + } else { + multiIntValuesBuilder_.setMessage(value); + } + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMultiIntValues() { + if (multiIntValuesBuilder_ == null) { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + } + multiIntValuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder + getMultiIntValuesBuilder() { + return getMultiIntValuesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder + getMultiIntValuesOrBuilder() { + if ((valueCase_ == 9) && (multiIntValuesBuilder_ != null)) { + return multiIntValuesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 9) { + return (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_; + } + return com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. The config variable value in case of config variable of type
    +     * multi integer.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder> + getMultiIntValuesFieldBuilder() { + if (multiIntValuesBuilder_ == null) { + if (!(valueCase_ == 9)) { + value_ = com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.getDefaultInstance(); + } + multiIntValuesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues.Builder, + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder>( + (com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 9; + onChanged(); + return multiIntValuesBuilder_; + } + + private java.lang.Object key_ = ""; + + /** + * + * + *
    +     * Output only. Key will be the
    +     * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +     * the config variable.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Output only. Key will be the
    +     * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +     * the config variable.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Output only. Key will be the
    +     * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +     * the config variable.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. Key will be the
    +     * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +     * the config variable.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. Key will be the
    +     * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +     * the config variable.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000100; + 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.apihub.v1.ConfigVariable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigVariable) + private static final com.google.cloud.apihub.v1.ConfigVariable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigVariable(); + } + + public static com.google.cloud.apihub.v1.ConfigVariable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigVariable 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.apihub.v1.ConfigVariable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableOrBuilder.java new file mode 100644 index 000000000000..4a50ab32eb5e --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableOrBuilder.java @@ -0,0 +1,388 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ConfigVariableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigVariable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * string.
    +   * 
    + * + * string string_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * integer.
    +   * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the intValue field is set. + */ + boolean hasIntValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * integer.
    +   * 
    + * + * int64 int_value = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The intValue. + */ + long getIntValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * boolean.
    +   * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * boolean.
    +   * 
    + * + * bool bool_value = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the secretValue field is set. + */ + boolean hasSecretValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The secretValue. + */ + com.google.cloud.apihub.v1.Secret getSecretValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * secret.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Secret secret_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.SecretOrBuilder getSecretValueOrBuilder(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enumValue field is set. + */ + boolean hasEnumValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enumValue. + */ + com.google.cloud.apihub.v1.ConfigValueOption getEnumValue(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * enum.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigValueOption enum_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumValueOrBuilder(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiSelectValues field is set. + */ + boolean hasMultiSelectValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiSelectValues. + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValues getMultiSelectValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi select.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiSelectValues multi_select_values = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiSelectValuesOrBuilder + getMultiSelectValuesOrBuilder(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiStringValues field is set. + */ + boolean hasMultiStringValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiStringValues. + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValues getMultiStringValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi string.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiStringValues multi_string_values = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiStringValuesOrBuilder + getMultiStringValuesOrBuilder(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multiIntValues field is set. + */ + boolean hasMultiIntValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multiIntValues. + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValues getMultiIntValues(); + + /** + * + * + *
    +   * Optional. The config variable value in case of config variable of type
    +   * multi integer.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariable.MultiIntValues multi_int_values = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigVariable.MultiIntValuesOrBuilder getMultiIntValuesOrBuilder(); + + /** + * + * + *
    +   * Output only. Key will be the
    +   * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +   * the config variable.
    +   * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
    +   * Output only. Key will be the
    +   * [id][google.cloud.apihub.v1.ConfigVariableTemplate.id] to uniquely identify
    +   * the config variable.
    +   * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + com.google.cloud.apihub.v1.ConfigVariable.ValueCase getValueCase(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplate.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplate.java new file mode 100644 index 000000000000..e1c5abf986d6 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplate.java @@ -0,0 +1,2762 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * ConfigVariableTemplate represents a configuration variable template present
    + * in a Plugin Config.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariableTemplate} + */ +public final class ConfigVariableTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.ConfigVariableTemplate) + ConfigVariableTemplateOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ConfigVariableTemplate.newBuilder() to construct. + private ConfigVariableTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigVariableTemplate() { + id_ = ""; + valueType_ = 0; + description_ = ""; + validationRegex_ = ""; + enumOptions_ = java.util.Collections.emptyList(); + multiSelectOptions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigVariableTemplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariableTemplate.class, + com.google.cloud.apihub.v1.ConfigVariableTemplate.Builder.class); + } + + /** + * + * + *
    +   * ValueType indicates the data type of the value.
    +   * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.ConfigVariableTemplate.ValueType} + */ + public enum ValueType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Value type is not specified.
    +     * 
    + * + * VALUE_TYPE_UNSPECIFIED = 0; + */ + VALUE_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +     * Value type is string.
    +     * 
    + * + * STRING = 1; + */ + STRING(1), + /** + * + * + *
    +     * Value type is integer.
    +     * 
    + * + * INT = 2; + */ + INT(2), + /** + * + * + *
    +     * Value type is boolean.
    +     * 
    + * + * BOOL = 3; + */ + BOOL(3), + /** + * + * + *
    +     * Value type is secret.
    +     * 
    + * + * SECRET = 4; + */ + SECRET(4), + /** + * + * + *
    +     * Value type is enum.
    +     * 
    + * + * ENUM = 5; + */ + ENUM(5), + /** + * + * + *
    +     * Value type is multi select.
    +     * 
    + * + * MULTI_SELECT = 6; + */ + MULTI_SELECT(6), + /** + * + * + *
    +     * Value type is multi string.
    +     * 
    + * + * MULTI_STRING = 7; + */ + MULTI_STRING(7), + /** + * + * + *
    +     * Value type is multi int.
    +     * 
    + * + * MULTI_INT = 8; + */ + MULTI_INT(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Value type is not specified.
    +     * 
    + * + * VALUE_TYPE_UNSPECIFIED = 0; + */ + public static final int VALUE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * Value type is string.
    +     * 
    + * + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + + /** + * + * + *
    +     * Value type is integer.
    +     * 
    + * + * INT = 2; + */ + public static final int INT_VALUE = 2; + + /** + * + * + *
    +     * Value type is boolean.
    +     * 
    + * + * BOOL = 3; + */ + public static final int BOOL_VALUE = 3; + + /** + * + * + *
    +     * Value type is secret.
    +     * 
    + * + * SECRET = 4; + */ + public static final int SECRET_VALUE = 4; + + /** + * + * + *
    +     * Value type is enum.
    +     * 
    + * + * ENUM = 5; + */ + public static final int ENUM_VALUE = 5; + + /** + * + * + *
    +     * Value type is multi select.
    +     * 
    + * + * MULTI_SELECT = 6; + */ + public static final int MULTI_SELECT_VALUE = 6; + + /** + * + * + *
    +     * Value type is multi string.
    +     * 
    + * + * MULTI_STRING = 7; + */ + public static final int MULTI_STRING_VALUE = 7; + + /** + * + * + *
    +     * Value type is multi int.
    +     * 
    + * + * MULTI_INT = 8; + */ + public static final int MULTI_INT_VALUE = 8; + + 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 ValueType 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 ValueType forNumber(int value) { + switch (value) { + case 0: + return VALUE_TYPE_UNSPECIFIED; + case 1: + return STRING; + case 2: + return INT; + case 3: + return BOOL; + case 4: + return SECRET; + case 5: + return ENUM; + case 6: + return MULTI_SELECT; + case 7: + return MULTI_STRING; + case 8: + return MULTI_INT; + 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 ValueType findValueByNumber(int number) { + return ValueType.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.apihub.v1.ConfigVariableTemplate.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ValueType[] VALUES = values(); + + public static ValueType 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 ValueType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.ConfigVariableTemplate.ValueType) + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + + /** + * + * + *
    +   * Required. ID of the config variable. Must be unique within the
    +   * configuration.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. ID of the config variable. Must be unique within the
    +   * configuration.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 2; + private int valueType_ = 0; + + /** + * + * + *
    +   * Required. Type of the parameter: string, int, bool etc.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + + /** + * + * + *
    +   * Required. Type of the parameter: string, int, bool etc.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The valueType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType getValueType() { + com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType result = + com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.forNumber(valueType_); + return result == null + ? com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
    +   * Optional. Description.
    +   * 
    + * + * 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.
    +   * 
    + * + * 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 VALIDATION_REGEX_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object validationRegex_ = ""; + + /** + * + * + *
    +   * Optional. Regular expression in RE2 syntax used for validating the `value`
    +   * of a `ConfigVariable`.
    +   * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationRegex. + */ + @java.lang.Override + public java.lang.String getValidationRegex() { + java.lang.Object ref = validationRegex_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationRegex_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. Regular expression in RE2 syntax used for validating the `value`
    +   * of a `ConfigVariable`.
    +   * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationRegex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidationRegexBytes() { + java.lang.Object ref = validationRegex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRED_FIELD_NUMBER = 5; + private boolean required_ = false; + + /** + * + * + *
    +   * Optional. Flag represents that this `ConfigVariable` must be provided for a
    +   * PluginInstance.
    +   * 
    + * + * bool required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + public static final int ENUM_OPTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List enumOptions_; + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getEnumOptionsList() { + return enumOptions_; + } + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getEnumOptionsOrBuilderList() { + return enumOptions_; + } + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getEnumOptionsCount() { + return enumOptions_.size(); + } + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getEnumOptions(int index) { + return enumOptions_.get(index); + } + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumOptionsOrBuilder(int index) { + return enumOptions_.get(index); + } + + public static final int MULTI_SELECT_OPTIONS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List multiSelectOptions_; + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getMultiSelectOptionsList() { + return multiSelectOptions_; + } + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getMultiSelectOptionsOrBuilderList() { + return multiSelectOptions_; + } + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMultiSelectOptionsCount() { + return multiSelectOptions_.size(); + } + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOption getMultiSelectOptions(int index) { + return multiSelectOptions_.get(index); + } + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getMultiSelectOptionsOrBuilder( + int index) { + return multiSelectOptions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (valueType_ + != com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.VALUE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationRegex_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, validationRegex_); + } + if (required_ != false) { + output.writeBool(5, required_); + } + for (int i = 0; i < enumOptions_.size(); i++) { + output.writeMessage(6, enumOptions_.get(i)); + } + for (int i = 0; i < multiSelectOptions_.size(); i++) { + output.writeMessage(7, multiSelectOptions_.get(i)); + } + 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(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (valueType_ + != com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.VALUE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationRegex_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, validationRegex_); + } + if (required_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, required_); + } + for (int i = 0; i < enumOptions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, enumOptions_.get(i)); + } + for (int i = 0; i < multiSelectOptions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, multiSelectOptions_.get(i)); + } + 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.apihub.v1.ConfigVariableTemplate)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.ConfigVariableTemplate other = + (com.google.cloud.apihub.v1.ConfigVariableTemplate) obj; + + if (!getId().equals(other.getId())) return false; + if (valueType_ != other.valueType_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getValidationRegex().equals(other.getValidationRegex())) return false; + if (getRequired() != other.getRequired()) return false; + if (!getEnumOptionsList().equals(other.getEnumOptionsList())) return false; + if (!getMultiSelectOptionsList().equals(other.getMultiSelectOptionsList())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + valueType_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + VALIDATION_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getValidationRegex().hashCode(); + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequired()); + if (getEnumOptionsCount() > 0) { + hash = (37 * hash) + ENUM_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getEnumOptionsList().hashCode(); + } + if (getMultiSelectOptionsCount() > 0) { + hash = (37 * hash) + MULTI_SELECT_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMultiSelectOptionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate 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.apihub.v1.ConfigVariableTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + 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.apihub.v1.ConfigVariableTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + java.io.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.apihub.v1.ConfigVariableTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseDelimitedFrom( + java.io.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.apihub.v1.ConfigVariableTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.ConfigVariableTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * ConfigVariableTemplate represents a configuration variable template present
    +   * in a Plugin Config.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.ConfigVariableTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.ConfigVariableTemplate) + com.google.cloud.apihub.v1.ConfigVariableTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.ConfigVariableTemplate.class, + com.google.cloud.apihub.v1.ConfigVariableTemplate.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.ConfigVariableTemplate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + valueType_ = 0; + description_ = ""; + validationRegex_ = ""; + required_ = false; + if (enumOptionsBuilder_ == null) { + enumOptions_ = java.util.Collections.emptyList(); + } else { + enumOptions_ = null; + enumOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (multiSelectOptionsBuilder_ == null) { + multiSelectOptions_ = java.util.Collections.emptyList(); + } else { + multiSelectOptions_ = null; + multiSelectOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_ConfigVariableTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariableTemplate getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.ConfigVariableTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariableTemplate build() { + com.google.cloud.apihub.v1.ConfigVariableTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariableTemplate buildPartial() { + com.google.cloud.apihub.v1.ConfigVariableTemplate result = + new com.google.cloud.apihub.v1.ConfigVariableTemplate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.apihub.v1.ConfigVariableTemplate result) { + if (enumOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + enumOptions_ = java.util.Collections.unmodifiableList(enumOptions_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.enumOptions_ = enumOptions_; + } else { + result.enumOptions_ = enumOptionsBuilder_.build(); + } + if (multiSelectOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + multiSelectOptions_ = java.util.Collections.unmodifiableList(multiSelectOptions_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.multiSelectOptions_ = multiSelectOptions_; + } else { + result.multiSelectOptions_ = multiSelectOptionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.apihub.v1.ConfigVariableTemplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.valueType_ = valueType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validationRegex_ = validationRegex_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.required_ = required_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.ConfigVariableTemplate) { + return mergeFrom((com.google.cloud.apihub.v1.ConfigVariableTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.ConfigVariableTemplate other) { + if (other == com.google.cloud.apihub.v1.ConfigVariableTemplate.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.valueType_ != 0) { + setValueTypeValue(other.getValueTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getValidationRegex().isEmpty()) { + validationRegex_ = other.validationRegex_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRequired() != false) { + setRequired(other.getRequired()); + } + if (enumOptionsBuilder_ == null) { + if (!other.enumOptions_.isEmpty()) { + if (enumOptions_.isEmpty()) { + enumOptions_ = other.enumOptions_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureEnumOptionsIsMutable(); + enumOptions_.addAll(other.enumOptions_); + } + onChanged(); + } + } else { + if (!other.enumOptions_.isEmpty()) { + if (enumOptionsBuilder_.isEmpty()) { + enumOptionsBuilder_.dispose(); + enumOptionsBuilder_ = null; + enumOptions_ = other.enumOptions_; + bitField0_ = (bitField0_ & ~0x00000020); + enumOptionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnumOptionsFieldBuilder() + : null; + } else { + enumOptionsBuilder_.addAllMessages(other.enumOptions_); + } + } + } + if (multiSelectOptionsBuilder_ == null) { + if (!other.multiSelectOptions_.isEmpty()) { + if (multiSelectOptions_.isEmpty()) { + multiSelectOptions_ = other.multiSelectOptions_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.addAll(other.multiSelectOptions_); + } + onChanged(); + } + } else { + if (!other.multiSelectOptions_.isEmpty()) { + if (multiSelectOptionsBuilder_.isEmpty()) { + multiSelectOptionsBuilder_.dispose(); + multiSelectOptionsBuilder_ = null; + multiSelectOptions_ = other.multiSelectOptions_; + bitField0_ = (bitField0_ & ~0x00000040); + multiSelectOptionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMultiSelectOptionsFieldBuilder() + : null; + } else { + multiSelectOptionsBuilder_.addAllMessages(other.multiSelectOptions_); + } + } + } + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + valueType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + validationRegex_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + required_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.cloud.apihub.v1.ConfigValueOption m = + input.readMessage( + com.google.cloud.apihub.v1.ConfigValueOption.parser(), extensionRegistry); + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + enumOptions_.add(m); + } else { + enumOptionsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.apihub.v1.ConfigValueOption m = + input.readMessage( + com.google.cloud.apihub.v1.ConfigValueOption.parser(), extensionRegistry); + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.add(m); + } else { + multiSelectOptionsBuilder_.addMessage(m); + } + 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 int bitField0_; + + private java.lang.Object id_ = ""; + + /** + * + * + *
    +     * Required. ID of the config variable. Must be unique within the
    +     * configuration.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. ID of the config variable. Must be unique within the
    +     * configuration.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. ID of the config variable. Must be unique within the
    +     * configuration.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. ID of the config variable. Must be unique within the
    +     * configuration.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. ID of the config variable. Must be unique within the
    +     * configuration.
    +     * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int valueType_ = 0; + + /** + * + * + *
    +     * Required. Type of the parameter: string, int, bool etc.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + + /** + * + * + *
    +     * Required. Type of the parameter: string, int, bool etc.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for valueType to set. + * @return This builder for chaining. + */ + public Builder setValueTypeValue(int value) { + valueType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Type of the parameter: string, int, bool etc.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The valueType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType getValueType() { + com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType result = + com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.forNumber(valueType_); + return result == null + ? com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +     * Required. Type of the parameter: string, int, bool etc.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The valueType to set. + * @return This builder for chaining. + */ + public Builder setValueType(com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + valueType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Type of the parameter: string, int, bool etc.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000002); + valueType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
    +     * Optional. Description.
    +     * 
    + * + * 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.
    +     * 
    + * + * 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.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Description.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object validationRegex_ = ""; + + /** + * + * + *
    +     * Optional. Regular expression in RE2 syntax used for validating the `value`
    +     * of a `ConfigVariable`.
    +     * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationRegex. + */ + public java.lang.String getValidationRegex() { + java.lang.Object ref = validationRegex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationRegex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. Regular expression in RE2 syntax used for validating the `value`
    +     * of a `ConfigVariable`.
    +     * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationRegex. + */ + public com.google.protobuf.ByteString getValidationRegexBytes() { + java.lang.Object ref = validationRegex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationRegex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. Regular expression in RE2 syntax used for validating the `value`
    +     * of a `ConfigVariable`.
    +     * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validationRegex to set. + * @return This builder for chaining. + */ + public Builder setValidationRegex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + validationRegex_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Regular expression in RE2 syntax used for validating the `value`
    +     * of a `ConfigVariable`.
    +     * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidationRegex() { + validationRegex_ = getDefaultInstance().getValidationRegex(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Regular expression in RE2 syntax used for validating the `value`
    +     * of a `ConfigVariable`.
    +     * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for validationRegex to set. + * @return This builder for chaining. + */ + public Builder setValidationRegexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + validationRegex_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean required_; + + /** + * + * + *
    +     * Optional. Flag represents that this `ConfigVariable` must be provided for a
    +     * PluginInstance.
    +     * 
    + * + * bool required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + /** + * + * + *
    +     * Optional. Flag represents that this `ConfigVariable` must be provided for a
    +     * PluginInstance.
    +     * 
    + * + * bool required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired(boolean value) { + + required_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Flag represents that this `ConfigVariable` must be provided for a
    +     * PluginInstance.
    +     * 
    + * + * bool required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequired() { + bitField0_ = (bitField0_ & ~0x00000010); + required_ = false; + onChanged(); + return this; + } + + private java.util.List enumOptions_ = + java.util.Collections.emptyList(); + + private void ensureEnumOptionsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + enumOptions_ = + new java.util.ArrayList(enumOptions_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + enumOptionsBuilder_; + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getEnumOptionsList() { + if (enumOptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(enumOptions_); + } else { + return enumOptionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getEnumOptionsCount() { + if (enumOptionsBuilder_ == null) { + return enumOptions_.size(); + } else { + return enumOptionsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption getEnumOptions(int index) { + if (enumOptionsBuilder_ == null) { + return enumOptions_.get(index); + } else { + return enumOptionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnumOptions(int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (enumOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumOptionsIsMutable(); + enumOptions_.set(index, value); + onChanged(); + } else { + enumOptionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnumOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + enumOptions_.set(index, builderForValue.build()); + onChanged(); + } else { + enumOptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addEnumOptions(com.google.cloud.apihub.v1.ConfigValueOption value) { + if (enumOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumOptionsIsMutable(); + enumOptions_.add(value); + onChanged(); + } else { + enumOptionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addEnumOptions(int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (enumOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnumOptionsIsMutable(); + enumOptions_.add(index, value); + onChanged(); + } else { + enumOptionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addEnumOptions( + com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + enumOptions_.add(builderForValue.build()); + onChanged(); + } else { + enumOptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addEnumOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + enumOptions_.add(index, builderForValue.build()); + onChanged(); + } else { + enumOptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllEnumOptions( + java.lang.Iterable values) { + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enumOptions_); + onChanged(); + } else { + enumOptionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEnumOptions() { + if (enumOptionsBuilder_ == null) { + enumOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + enumOptionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeEnumOptions(int index) { + if (enumOptionsBuilder_ == null) { + ensureEnumOptionsIsMutable(); + enumOptions_.remove(index); + onChanged(); + } else { + enumOptionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder getEnumOptionsBuilder(int index) { + return getEnumOptionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumOptionsOrBuilder( + int index) { + if (enumOptionsBuilder_ == null) { + return enumOptions_.get(index); + } else { + return enumOptionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getEnumOptionsOrBuilderList() { + if (enumOptionsBuilder_ != null) { + return enumOptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(enumOptions_); + } + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addEnumOptionsBuilder() { + return getEnumOptionsFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addEnumOptionsBuilder(int index) { + return getEnumOptionsFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getEnumOptionsBuilderList() { + return getEnumOptionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + getEnumOptionsFieldBuilder() { + if (enumOptionsBuilder_ == null) { + enumOptionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder>( + enumOptions_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + enumOptions_ = null; + } + return enumOptionsBuilder_; + } + + private java.util.List multiSelectOptions_ = + java.util.Collections.emptyList(); + + private void ensureMultiSelectOptionsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + multiSelectOptions_ = + new java.util.ArrayList( + multiSelectOptions_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + multiSelectOptionsBuilder_; + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMultiSelectOptionsList() { + if (multiSelectOptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(multiSelectOptions_); + } else { + return multiSelectOptionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMultiSelectOptionsCount() { + if (multiSelectOptionsBuilder_ == null) { + return multiSelectOptions_.size(); + } else { + return multiSelectOptionsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption getMultiSelectOptions(int index) { + if (multiSelectOptionsBuilder_ == null) { + return multiSelectOptions_.get(index); + } else { + return multiSelectOptionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiSelectOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (multiSelectOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.set(index, value); + onChanged(); + } else { + multiSelectOptionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultiSelectOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.set(index, builderForValue.build()); + onChanged(); + } else { + multiSelectOptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMultiSelectOptions(com.google.cloud.apihub.v1.ConfigValueOption value) { + if (multiSelectOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.add(value); + onChanged(); + } else { + multiSelectOptionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMultiSelectOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption value) { + if (multiSelectOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.add(index, value); + onChanged(); + } else { + multiSelectOptionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMultiSelectOptions( + com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.add(builderForValue.build()); + onChanged(); + } else { + multiSelectOptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMultiSelectOptions( + int index, com.google.cloud.apihub.v1.ConfigValueOption.Builder builderForValue) { + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.add(index, builderForValue.build()); + onChanged(); + } else { + multiSelectOptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMultiSelectOptions( + java.lang.Iterable values) { + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, multiSelectOptions_); + onChanged(); + } else { + multiSelectOptionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMultiSelectOptions() { + if (multiSelectOptionsBuilder_ == null) { + multiSelectOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + multiSelectOptionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMultiSelectOptions(int index) { + if (multiSelectOptionsBuilder_ == null) { + ensureMultiSelectOptionsIsMutable(); + multiSelectOptions_.remove(index); + onChanged(); + } else { + multiSelectOptionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder getMultiSelectOptionsBuilder( + int index) { + return getMultiSelectOptionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getMultiSelectOptionsOrBuilder( + int index) { + if (multiSelectOptionsBuilder_ == null) { + return multiSelectOptions_.get(index); + } else { + return multiSelectOptionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMultiSelectOptionsOrBuilderList() { + if (multiSelectOptionsBuilder_ != null) { + return multiSelectOptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(multiSelectOptions_); + } + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addMultiSelectOptionsBuilder() { + return getMultiSelectOptionsFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.ConfigValueOption.Builder addMultiSelectOptionsBuilder( + int index) { + return getMultiSelectOptionsFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.ConfigValueOption.getDefaultInstance()); + } + + /** + * + * + *
    +     * Optional. Multi select options. To be populated if `ValueType` is
    +     * `MULTI_SELECT`.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMultiSelectOptionsBuilderList() { + return getMultiSelectOptionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder> + getMultiSelectOptionsFieldBuilder() { + if (multiSelectOptionsBuilder_ == null) { + multiSelectOptionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.ConfigValueOption, + com.google.cloud.apihub.v1.ConfigValueOption.Builder, + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder>( + multiSelectOptions_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + multiSelectOptions_ = null; + } + return multiSelectOptionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.ConfigVariableTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.ConfigVariableTemplate) + private static final com.google.cloud.apihub.v1.ConfigVariableTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.ConfigVariableTemplate(); + } + + public static com.google.cloud.apihub.v1.ConfigVariableTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigVariableTemplate 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.apihub.v1.ConfigVariableTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplateOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplateOrBuilder.java new file mode 100644 index 000000000000..89cc12816d62 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/ConfigVariableTemplateOrBuilder.java @@ -0,0 +1,289 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface ConfigVariableTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.ConfigVariableTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. ID of the config variable. Must be unique within the
    +   * configuration.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + + /** + * + * + *
    +   * Required. ID of the config variable. Must be unique within the
    +   * configuration.
    +   * 
    + * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
    +   * Required. Type of the parameter: string, int, bool etc.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for valueType. + */ + int getValueTypeValue(); + + /** + * + * + *
    +   * Required. Type of the parameter: string, int, bool etc.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ConfigVariableTemplate.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The valueType. + */ + com.google.cloud.apihub.v1.ConfigVariableTemplate.ValueType getValueType(); + + /** + * + * + *
    +   * Optional. Description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
    +   * Optional. Description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Optional. Regular expression in RE2 syntax used for validating the `value`
    +   * of a `ConfigVariable`.
    +   * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationRegex. + */ + java.lang.String getValidationRegex(); + + /** + * + * + *
    +   * Optional. Regular expression in RE2 syntax used for validating the `value`
    +   * of a `ConfigVariable`.
    +   * 
    + * + * string validation_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationRegex. + */ + com.google.protobuf.ByteString getValidationRegexBytes(); + + /** + * + * + *
    +   * Optional. Flag represents that this `ConfigVariable` must be provided for a
    +   * PluginInstance.
    +   * 
    + * + * bool required = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The required. + */ + boolean getRequired(); + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getEnumOptionsList(); + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOption getEnumOptions(int index); + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getEnumOptionsCount(); + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getEnumOptionsOrBuilderList(); + + /** + * + * + *
    +   * Optional. Enum options. To be populated if `ValueType` is `ENUM`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption enum_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getEnumOptionsOrBuilder(int index); + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getMultiSelectOptionsList(); + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOption getMultiSelectOptions(int index); + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMultiSelectOptionsCount(); + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getMultiSelectOptionsOrBuilderList(); + + /** + * + * + *
    +   * Optional. Multi select options. To be populated if `ValueType` is
    +   * `MULTI_SELECT`.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.ConfigValueOption multi_select_options = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.ConfigValueOptionOrBuilder getMultiSelectOptionsOrBuilder(int index); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequest.java new file mode 100644 index 000000000000..d2b4e45d4108 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequest.java @@ -0,0 +1,1254 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/apihub_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreateApiOperationRequest} + */ +public final class CreateApiOperationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CreateApiOperationRequest) + CreateApiOperationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateApiOperationRequest.newBuilder() to construct. + private CreateApiOperationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateApiOperationRequest() { + parent_ = ""; + apiOperationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateApiOperationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreateApiOperationRequest.class, + com.google.cloud.apihub.v1.CreateApiOperationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
    +   * Required. The parent resource for the operation resource.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +   * 
    + * + * + * 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 for the operation resource.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +   * 
    + * + * + * 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 API_OPERATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiOperationId_ = ""; + + /** + * + * + *
    +   * Optional. The ID to use for the operation resource, which will become the
    +   * final component of the operation's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another operation resource in the API
    +   * hub.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-500 characters, overall resource name which
    +   * will be of format
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +   * its length is limited to 700 characters, and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiOperationId. + */ + @java.lang.Override + public java.lang.String getApiOperationId() { + java.lang.Object ref = apiOperationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiOperationId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The ID to use for the operation resource, which will become the
    +   * final component of the operation's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another operation resource in the API
    +   * hub.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-500 characters, overall resource name which
    +   * will be of format
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +   * its length is limited to 700 characters, and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiOperationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiOperationIdBytes() { + java.lang.Object ref = apiOperationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiOperationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_OPERATION_FIELD_NUMBER = 3; + private com.google.cloud.apihub.v1.ApiOperation apiOperation_; + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiOperation field is set. + */ + @java.lang.Override + public boolean hasApiOperation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiOperation. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiOperation getApiOperation() { + return apiOperation_ == null + ? com.google.cloud.apihub.v1.ApiOperation.getDefaultInstance() + : apiOperation_; + } + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.ApiOperationOrBuilder getApiOperationOrBuilder() { + return apiOperation_ == null + ? com.google.cloud.apihub.v1.ApiOperation.getDefaultInstance() + : apiOperation_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(apiOperationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, apiOperationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getApiOperation()); + } + 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(apiOperationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, apiOperationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getApiOperation()); + } + 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.apihub.v1.CreateApiOperationRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CreateApiOperationRequest other = + (com.google.cloud.apihub.v1.CreateApiOperationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getApiOperationId().equals(other.getApiOperationId())) return false; + if (hasApiOperation() != other.hasApiOperation()) return false; + if (hasApiOperation()) { + if (!getApiOperation().equals(other.getApiOperation())) 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) + API_OPERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getApiOperationId().hashCode(); + if (hasApiOperation()) { + hash = (37 * hash) + API_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getApiOperation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest 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.apihub.v1.CreateApiOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + 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.apihub.v1.CreateApiOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + java.io.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.apihub.v1.CreateApiOperationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseDelimitedFrom( + java.io.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.apihub.v1.CreateApiOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CreateApiOperationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreateApiOperationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CreateApiOperationRequest) + com.google.cloud.apihub.v1.CreateApiOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreateApiOperationRequest.class, + com.google.cloud.apihub.v1.CreateApiOperationRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CreateApiOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getApiOperationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + apiOperationId_ = ""; + apiOperation_ = null; + if (apiOperationBuilder_ != null) { + apiOperationBuilder_.dispose(); + apiOperationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_CreateApiOperationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateApiOperationRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CreateApiOperationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateApiOperationRequest build() { + com.google.cloud.apihub.v1.CreateApiOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateApiOperationRequest buildPartial() { + com.google.cloud.apihub.v1.CreateApiOperationRequest result = + new com.google.cloud.apihub.v1.CreateApiOperationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CreateApiOperationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.apiOperationId_ = apiOperationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.apiOperation_ = + apiOperationBuilder_ == null ? apiOperation_ : apiOperationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CreateApiOperationRequest) { + return mergeFrom((com.google.cloud.apihub.v1.CreateApiOperationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CreateApiOperationRequest other) { + if (other == com.google.cloud.apihub.v1.CreateApiOperationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getApiOperationId().isEmpty()) { + apiOperationId_ = other.apiOperationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasApiOperation()) { + mergeApiOperation(other.getApiOperation()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + apiOperationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getApiOperationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
    +     * Required. The parent resource for the operation resource.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +     * 
    + * + * + * 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 for the operation resource.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +     * 
    + * + * + * 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 for the operation resource.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource for the operation resource.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource for the operation resource.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object apiOperationId_ = ""; + + /** + * + * + *
    +     * Optional. The ID to use for the operation resource, which will become the
    +     * final component of the operation's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another operation resource in the API
    +     * hub.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-500 characters, overall resource name which
    +     * will be of format
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +     * its length is limited to 700 characters, and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiOperationId. + */ + public java.lang.String getApiOperationId() { + java.lang.Object ref = apiOperationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiOperationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the operation resource, which will become the
    +     * final component of the operation's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another operation resource in the API
    +     * hub.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-500 characters, overall resource name which
    +     * will be of format
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +     * its length is limited to 700 characters, and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiOperationId. + */ + public com.google.protobuf.ByteString getApiOperationIdBytes() { + java.lang.Object ref = apiOperationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiOperationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the operation resource, which will become the
    +     * final component of the operation's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another operation resource in the API
    +     * hub.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-500 characters, overall resource name which
    +     * will be of format
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +     * its length is limited to 700 characters, and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The apiOperationId to set. + * @return This builder for chaining. + */ + public Builder setApiOperationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiOperationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the operation resource, which will become the
    +     * final component of the operation's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another operation resource in the API
    +     * hub.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-500 characters, overall resource name which
    +     * will be of format
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +     * its length is limited to 700 characters, and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearApiOperationId() { + apiOperationId_ = getDefaultInstance().getApiOperationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the operation resource, which will become the
    +     * final component of the operation's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another operation resource in the API
    +     * hub.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-500 characters, overall resource name which
    +     * will be of format
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +     * its length is limited to 700 characters, and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for apiOperationId to set. + * @return This builder for chaining. + */ + public Builder setApiOperationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiOperationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.ApiOperation apiOperation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiOperation, + com.google.cloud.apihub.v1.ApiOperation.Builder, + com.google.cloud.apihub.v1.ApiOperationOrBuilder> + apiOperationBuilder_; + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiOperation field is set. + */ + public boolean hasApiOperation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiOperation. + */ + public com.google.cloud.apihub.v1.ApiOperation getApiOperation() { + if (apiOperationBuilder_ == null) { + return apiOperation_ == null + ? com.google.cloud.apihub.v1.ApiOperation.getDefaultInstance() + : apiOperation_; + } else { + return apiOperationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiOperation(com.google.cloud.apihub.v1.ApiOperation value) { + if (apiOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + apiOperation_ = value; + } else { + apiOperationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApiOperation( + com.google.cloud.apihub.v1.ApiOperation.Builder builderForValue) { + if (apiOperationBuilder_ == null) { + apiOperation_ = builderForValue.build(); + } else { + apiOperationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeApiOperation(com.google.cloud.apihub.v1.ApiOperation value) { + if (apiOperationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && apiOperation_ != null + && apiOperation_ != com.google.cloud.apihub.v1.ApiOperation.getDefaultInstance()) { + getApiOperationBuilder().mergeFrom(value); + } else { + apiOperation_ = value; + } + } else { + apiOperationBuilder_.mergeFrom(value); + } + if (apiOperation_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApiOperation() { + bitField0_ = (bitField0_ & ~0x00000004); + apiOperation_ = null; + if (apiOperationBuilder_ != null) { + apiOperationBuilder_.dispose(); + apiOperationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.ApiOperation.Builder getApiOperationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getApiOperationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.ApiOperationOrBuilder getApiOperationOrBuilder() { + if (apiOperationBuilder_ != null) { + return apiOperationBuilder_.getMessageOrBuilder(); + } else { + return apiOperation_ == null + ? com.google.cloud.apihub.v1.ApiOperation.getDefaultInstance() + : apiOperation_; + } + } + + /** + * + * + *
    +     * Required. The operation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiOperation, + com.google.cloud.apihub.v1.ApiOperation.Builder, + com.google.cloud.apihub.v1.ApiOperationOrBuilder> + getApiOperationFieldBuilder() { + if (apiOperationBuilder_ == null) { + apiOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.ApiOperation, + com.google.cloud.apihub.v1.ApiOperation.Builder, + com.google.cloud.apihub.v1.ApiOperationOrBuilder>( + getApiOperation(), getParentForChildren(), isClean()); + apiOperation_ = null; + } + return apiOperationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.CreateApiOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CreateApiOperationRequest) + private static final com.google.cloud.apihub.v1.CreateApiOperationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CreateApiOperationRequest(); + } + + public static com.google.cloud.apihub.v1.CreateApiOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApiOperationRequest 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.apihub.v1.CreateApiOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequestOrBuilder.java new file mode 100644 index 000000000000..d985f8f9deaf --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateApiOperationRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/apihub_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CreateApiOperationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CreateApiOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent resource for the operation resource.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
    +   * Required. The parent resource for the operation resource.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Optional. The ID to use for the operation resource, which will become the
    +   * final component of the operation's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another operation resource in the API
    +   * hub.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-500 characters, overall resource name which
    +   * will be of format
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +   * its length is limited to 700 characters, and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The apiOperationId. + */ + java.lang.String getApiOperationId(); + + /** + * + * + *
    +   * Optional. The ID to use for the operation resource, which will become the
    +   * final component of the operation's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another operation resource in the API
    +   * hub.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-500 characters, overall resource name which
    +   * will be of format
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
    +   * its length is limited to 700 characters, and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string api_operation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for apiOperationId. + */ + com.google.protobuf.ByteString getApiOperationIdBytes(); + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the apiOperation field is set. + */ + boolean hasApiOperation(); + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The apiOperation. + */ + com.google.cloud.apihub.v1.ApiOperation getApiOperation(); + + /** + * + * + *
    +   * Required. The operation resource to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.ApiOperation api_operation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.ApiOperationOrBuilder getApiOperationOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequest.java new file mode 100644 index 000000000000..e2bd7124f87a --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequest.java @@ -0,0 +1,1215 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [CreateCuration][ApiHub.CreateCuration] method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreateCurationRequest} + */ +public final class CreateCurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CreateCurationRequest) + CreateCurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateCurationRequest.newBuilder() to construct. + private CreateCurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCurationRequest() { + parent_ = ""; + curationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_CreateCurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_CreateCurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreateCurationRequest.class, + com.google.cloud.apihub.v1.CreateCurationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
    +   * Required. The parent resource for the curation resource.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * 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 for the curation resource.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * 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 CURATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object curationId_ = ""; + + /** + * + * + *
    +   * Optional. The ID to use for the curation resource, which will become the
    +   * final component of the curations's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified ID is already used by another curation resource in the API
    +   * hub.
    +   * * If not provided, a system generated ID will be used.
    +   *
    +   * This value should be 4-500 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The curationId. + */ + @java.lang.Override + public java.lang.String getCurationId() { + java.lang.Object ref = curationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + curationId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The ID to use for the curation resource, which will become the
    +   * final component of the curations's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified ID is already used by another curation resource in the API
    +   * hub.
    +   * * If not provided, a system generated ID will be used.
    +   *
    +   * This value should be 4-500 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for curationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurationIdBytes() { + java.lang.Object ref = curationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + curationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURATION_FIELD_NUMBER = 3; + private com.google.cloud.apihub.v1.Curation curation_; + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the curation field is set. + */ + @java.lang.Override + public boolean hasCuration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curation. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation getCuration() { + return curation_ == null ? com.google.cloud.apihub.v1.Curation.getDefaultInstance() : curation_; + } + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationOrBuilder getCurationOrBuilder() { + return curation_ == null ? com.google.cloud.apihub.v1.Curation.getDefaultInstance() : curation_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(curationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, curationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCuration()); + } + 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(curationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, curationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCuration()); + } + 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.apihub.v1.CreateCurationRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CreateCurationRequest other = + (com.google.cloud.apihub.v1.CreateCurationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCurationId().equals(other.getCurationId())) return false; + if (hasCuration() != other.hasCuration()) return false; + if (hasCuration()) { + if (!getCuration().equals(other.getCuration())) 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) + CURATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getCurationId().hashCode(); + if (hasCuration()) { + hash = (37 * hash) + CURATION_FIELD_NUMBER; + hash = (53 * hash) + getCuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest 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.apihub.v1.CreateCurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom( + 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.apihub.v1.CreateCurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom( + java.io.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.apihub.v1.CreateCurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseDelimitedFrom( + java.io.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.apihub.v1.CreateCurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CreateCurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [CreateCuration][ApiHub.CreateCuration] method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreateCurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CreateCurationRequest) + com.google.cloud.apihub.v1.CreateCurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_CreateCurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_CreateCurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreateCurationRequest.class, + com.google.cloud.apihub.v1.CreateCurationRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CreateCurationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + curationId_ = ""; + curation_ = null; + if (curationBuilder_ != null) { + curationBuilder_.dispose(); + curationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_CreateCurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateCurationRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CreateCurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateCurationRequest build() { + com.google.cloud.apihub.v1.CreateCurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreateCurationRequest buildPartial() { + com.google.cloud.apihub.v1.CreateCurationRequest result = + new com.google.cloud.apihub.v1.CreateCurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CreateCurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.curationId_ = curationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.curation_ = curationBuilder_ == null ? curation_ : curationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CreateCurationRequest) { + return mergeFrom((com.google.cloud.apihub.v1.CreateCurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CreateCurationRequest other) { + if (other == com.google.cloud.apihub.v1.CreateCurationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCurationId().isEmpty()) { + curationId_ = other.curationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCuration()) { + mergeCuration(other.getCuration()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + curationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
    +     * Required. The parent resource for the curation resource.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The parent resource for the curation resource.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The parent resource for the curation resource.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource for the curation resource.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource for the curation resource.
    +     * Format: `projects/{project}/locations/{location}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object curationId_ = ""; + + /** + * + * + *
    +     * Optional. The ID to use for the curation resource, which will become the
    +     * final component of the curations's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified ID is already used by another curation resource in the API
    +     * hub.
    +     * * If not provided, a system generated ID will be used.
    +     *
    +     * This value should be 4-500 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The curationId. + */ + public java.lang.String getCurationId() { + java.lang.Object ref = curationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + curationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the curation resource, which will become the
    +     * final component of the curations's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified ID is already used by another curation resource in the API
    +     * hub.
    +     * * If not provided, a system generated ID will be used.
    +     *
    +     * This value should be 4-500 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for curationId. + */ + public com.google.protobuf.ByteString getCurationIdBytes() { + java.lang.Object ref = curationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + curationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the curation resource, which will become the
    +     * final component of the curations's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified ID is already used by another curation resource in the API
    +     * hub.
    +     * * If not provided, a system generated ID will be used.
    +     *
    +     * This value should be 4-500 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The curationId to set. + * @return This builder for chaining. + */ + public Builder setCurationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + curationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the curation resource, which will become the
    +     * final component of the curations's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified ID is already used by another curation resource in the API
    +     * hub.
    +     * * If not provided, a system generated ID will be used.
    +     *
    +     * This value should be 4-500 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCurationId() { + curationId_ = getDefaultInstance().getCurationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the curation resource, which will become the
    +     * final component of the curations's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified ID is already used by another curation resource in the API
    +     * hub.
    +     * * If not provided, a system generated ID will be used.
    +     *
    +     * This value should be 4-500 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for curationId to set. + * @return This builder for chaining. + */ + public Builder setCurationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + curationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Curation curation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Curation, + com.google.cloud.apihub.v1.Curation.Builder, + com.google.cloud.apihub.v1.CurationOrBuilder> + curationBuilder_; + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the curation field is set. + */ + public boolean hasCuration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curation. + */ + public com.google.cloud.apihub.v1.Curation getCuration() { + if (curationBuilder_ == null) { + return curation_ == null + ? com.google.cloud.apihub.v1.Curation.getDefaultInstance() + : curation_; + } else { + return curationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCuration(com.google.cloud.apihub.v1.Curation value) { + if (curationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + curation_ = value; + } else { + curationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCuration(com.google.cloud.apihub.v1.Curation.Builder builderForValue) { + if (curationBuilder_ == null) { + curation_ = builderForValue.build(); + } else { + curationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCuration(com.google.cloud.apihub.v1.Curation value) { + if (curationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && curation_ != null + && curation_ != com.google.cloud.apihub.v1.Curation.getDefaultInstance()) { + getCurationBuilder().mergeFrom(value); + } else { + curation_ = value; + } + } else { + curationBuilder_.mergeFrom(value); + } + if (curation_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCuration() { + bitField0_ = (bitField0_ & ~0x00000004); + curation_ = null; + if (curationBuilder_ != null) { + curationBuilder_.dispose(); + curationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Curation.Builder getCurationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.CurationOrBuilder getCurationOrBuilder() { + if (curationBuilder_ != null) { + return curationBuilder_.getMessageOrBuilder(); + } else { + return curation_ == null + ? com.google.cloud.apihub.v1.Curation.getDefaultInstance() + : curation_; + } + } + + /** + * + * + *
    +     * Required. The curation resource to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Curation, + com.google.cloud.apihub.v1.Curation.Builder, + com.google.cloud.apihub.v1.CurationOrBuilder> + getCurationFieldBuilder() { + if (curationBuilder_ == null) { + curationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Curation, + com.google.cloud.apihub.v1.Curation.Builder, + com.google.cloud.apihub.v1.CurationOrBuilder>( + getCuration(), getParentForChildren(), isClean()); + curation_ = null; + } + return curationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.CreateCurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CreateCurationRequest) + private static final com.google.cloud.apihub.v1.CreateCurationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CreateCurationRequest(); + } + + public static com.google.cloud.apihub.v1.CreateCurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCurationRequest 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.apihub.v1.CreateCurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequestOrBuilder.java new file mode 100644 index 000000000000..287f144bde25 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateCurationRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CreateCurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CreateCurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent resource for the curation resource.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
    +   * Required. The parent resource for the curation resource.
    +   * Format: `projects/{project}/locations/{location}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Optional. The ID to use for the curation resource, which will become the
    +   * final component of the curations's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified ID is already used by another curation resource in the API
    +   * hub.
    +   * * If not provided, a system generated ID will be used.
    +   *
    +   * This value should be 4-500 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The curationId. + */ + java.lang.String getCurationId(); + + /** + * + * + *
    +   * Optional. The ID to use for the curation resource, which will become the
    +   * final component of the curations's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified ID is already used by another curation resource in the API
    +   * hub.
    +   * * If not provided, a system generated ID will be used.
    +   *
    +   * This value should be 4-500 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string curation_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for curationId. + */ + com.google.protobuf.ByteString getCurationIdBytes(); + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the curation field is set. + */ + boolean hasCuration(); + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curation. + */ + com.google.cloud.apihub.v1.Curation getCuration(); + + /** + * + * + *
    +   * Required. The curation resource to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Curation curation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.CurationOrBuilder getCurationOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequest.java new file mode 100644 index 000000000000..c389c594432f --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequest.java @@ -0,0 +1,1236 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The
    + * [CreatePluginInstance][google.cloud.apihub.v1.ApiHubPlugin.CreatePluginInstance]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreatePluginInstanceRequest} + */ +public final class CreatePluginInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CreatePluginInstanceRequest) + CreatePluginInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePluginInstanceRequest.newBuilder() to construct. + private CreatePluginInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePluginInstanceRequest() { + parent_ = ""; + pluginInstanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePluginInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreatePluginInstanceRequest.class, + com.google.cloud.apihub.v1.CreatePluginInstanceRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
    +   * Required. The parent of the plugin instance resource.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * 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 of the plugin instance resource.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * 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 PLUGIN_INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginInstanceId_ = ""; + + /** + * + * + *
    +   * Optional. The ID to use for the plugin instance, which will become the
    +   * final component of the plugin instance's resource name. This field is
    +   * optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another plugin instance in the plugin
    +   * resource.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginInstanceId. + */ + @java.lang.Override + public java.lang.String getPluginInstanceId() { + java.lang.Object ref = pluginInstanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstanceId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The ID to use for the plugin instance, which will become the
    +   * final component of the plugin instance's resource name. This field is
    +   * optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another plugin instance in the plugin
    +   * resource.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginInstanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginInstanceIdBytes() { + java.lang.Object ref = pluginInstanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLUGIN_INSTANCE_FIELD_NUMBER = 3; + private com.google.cloud.apihub.v1.PluginInstance pluginInstance_; + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pluginInstance field is set. + */ + @java.lang.Override + public boolean hasPluginInstance() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pluginInstance. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.PluginInstance getPluginInstance() { + return pluginInstance_ == null + ? com.google.cloud.apihub.v1.PluginInstance.getDefaultInstance() + : pluginInstance_; + } + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.PluginInstanceOrBuilder getPluginInstanceOrBuilder() { + return pluginInstance_ == null + ? com.google.cloud.apihub.v1.PluginInstance.getDefaultInstance() + : pluginInstance_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(pluginInstanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pluginInstanceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPluginInstance()); + } + 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(pluginInstanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pluginInstanceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPluginInstance()); + } + 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.apihub.v1.CreatePluginInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CreatePluginInstanceRequest other = + (com.google.cloud.apihub.v1.CreatePluginInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPluginInstanceId().equals(other.getPluginInstanceId())) return false; + if (hasPluginInstance() != other.hasPluginInstance()) return false; + if (hasPluginInstance()) { + if (!getPluginInstance().equals(other.getPluginInstance())) 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) + PLUGIN_INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPluginInstanceId().hashCode(); + if (hasPluginInstance()) { + hash = (37 * hash) + PLUGIN_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getPluginInstance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest 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.apihub.v1.CreatePluginInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + 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.apihub.v1.CreatePluginInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + java.io.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.apihub.v1.CreatePluginInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseDelimitedFrom( + java.io.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.apihub.v1.CreatePluginInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CreatePluginInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The
    +   * [CreatePluginInstance][google.cloud.apihub.v1.ApiHubPlugin.CreatePluginInstance]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreatePluginInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CreatePluginInstanceRequest) + com.google.cloud.apihub.v1.CreatePluginInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreatePluginInstanceRequest.class, + com.google.cloud.apihub.v1.CreatePluginInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CreatePluginInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPluginInstanceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pluginInstanceId_ = ""; + pluginInstance_ = null; + if (pluginInstanceBuilder_ != null) { + pluginInstanceBuilder_.dispose(); + pluginInstanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CreatePluginInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginInstanceRequest build() { + com.google.cloud.apihub.v1.CreatePluginInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginInstanceRequest buildPartial() { + com.google.cloud.apihub.v1.CreatePluginInstanceRequest result = + new com.google.cloud.apihub.v1.CreatePluginInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CreatePluginInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pluginInstanceId_ = pluginInstanceId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pluginInstance_ = + pluginInstanceBuilder_ == null ? pluginInstance_ : pluginInstanceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CreatePluginInstanceRequest) { + return mergeFrom((com.google.cloud.apihub.v1.CreatePluginInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CreatePluginInstanceRequest other) { + if (other == com.google.cloud.apihub.v1.CreatePluginInstanceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPluginInstanceId().isEmpty()) { + pluginInstanceId_ = other.pluginInstanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPluginInstance()) { + mergePluginInstance(other.getPluginInstance()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pluginInstanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPluginInstanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
    +     * Required. The parent of the plugin instance resource.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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 of the plugin instance resource.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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 of the plugin instance resource.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent of the plugin instance resource.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent of the plugin instance resource.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pluginInstanceId_ = ""; + + /** + * + * + *
    +     * Optional. The ID to use for the plugin instance, which will become the
    +     * final component of the plugin instance's resource name. This field is
    +     * optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another plugin instance in the plugin
    +     * resource.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginInstanceId. + */ + public java.lang.String getPluginInstanceId() { + java.lang.Object ref = pluginInstanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the plugin instance, which will become the
    +     * final component of the plugin instance's resource name. This field is
    +     * optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another plugin instance in the plugin
    +     * resource.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginInstanceId. + */ + public com.google.protobuf.ByteString getPluginInstanceIdBytes() { + java.lang.Object ref = pluginInstanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the plugin instance, which will become the
    +     * final component of the plugin instance's resource name. This field is
    +     * optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another plugin instance in the plugin
    +     * resource.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pluginInstanceId to set. + * @return This builder for chaining. + */ + public Builder setPluginInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginInstanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the plugin instance, which will become the
    +     * final component of the plugin instance's resource name. This field is
    +     * optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another plugin instance in the plugin
    +     * resource.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPluginInstanceId() { + pluginInstanceId_ = getDefaultInstance().getPluginInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the plugin instance, which will become the
    +     * final component of the plugin instance's resource name. This field is
    +     * optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another plugin instance in the plugin
    +     * resource.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, and valid characters
    +     * are /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pluginInstanceId to set. + * @return This builder for chaining. + */ + public Builder setPluginInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginInstanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.PluginInstance pluginInstance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.PluginInstance, + com.google.cloud.apihub.v1.PluginInstance.Builder, + com.google.cloud.apihub.v1.PluginInstanceOrBuilder> + pluginInstanceBuilder_; + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pluginInstance field is set. + */ + public boolean hasPluginInstance() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pluginInstance. + */ + public com.google.cloud.apihub.v1.PluginInstance getPluginInstance() { + if (pluginInstanceBuilder_ == null) { + return pluginInstance_ == null + ? com.google.cloud.apihub.v1.PluginInstance.getDefaultInstance() + : pluginInstance_; + } else { + return pluginInstanceBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPluginInstance(com.google.cloud.apihub.v1.PluginInstance value) { + if (pluginInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pluginInstance_ = value; + } else { + pluginInstanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPluginInstance( + com.google.cloud.apihub.v1.PluginInstance.Builder builderForValue) { + if (pluginInstanceBuilder_ == null) { + pluginInstance_ = builderForValue.build(); + } else { + pluginInstanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePluginInstance(com.google.cloud.apihub.v1.PluginInstance value) { + if (pluginInstanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pluginInstance_ != null + && pluginInstance_ != com.google.cloud.apihub.v1.PluginInstance.getDefaultInstance()) { + getPluginInstanceBuilder().mergeFrom(value); + } else { + pluginInstance_ = value; + } + } else { + pluginInstanceBuilder_.mergeFrom(value); + } + if (pluginInstance_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPluginInstance() { + bitField0_ = (bitField0_ & ~0x00000004); + pluginInstance_ = null; + if (pluginInstanceBuilder_ != null) { + pluginInstanceBuilder_.dispose(); + pluginInstanceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.PluginInstance.Builder getPluginInstanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPluginInstanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.PluginInstanceOrBuilder getPluginInstanceOrBuilder() { + if (pluginInstanceBuilder_ != null) { + return pluginInstanceBuilder_.getMessageOrBuilder(); + } else { + return pluginInstance_ == null + ? com.google.cloud.apihub.v1.PluginInstance.getDefaultInstance() + : pluginInstance_; + } + } + + /** + * + * + *
    +     * Required. The plugin instance to create.
    +     * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.PluginInstance, + com.google.cloud.apihub.v1.PluginInstance.Builder, + com.google.cloud.apihub.v1.PluginInstanceOrBuilder> + getPluginInstanceFieldBuilder() { + if (pluginInstanceBuilder_ == null) { + pluginInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.PluginInstance, + com.google.cloud.apihub.v1.PluginInstance.Builder, + com.google.cloud.apihub.v1.PluginInstanceOrBuilder>( + getPluginInstance(), getParentForChildren(), isClean()); + pluginInstance_ = null; + } + return pluginInstanceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.CreatePluginInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CreatePluginInstanceRequest) + private static final com.google.cloud.apihub.v1.CreatePluginInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CreatePluginInstanceRequest(); + } + + public static com.google.cloud.apihub.v1.CreatePluginInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePluginInstanceRequest 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.apihub.v1.CreatePluginInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..61b76e7826a4 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginInstanceRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CreatePluginInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CreatePluginInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent of the plugin instance resource.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
    +   * Required. The parent of the plugin instance resource.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Optional. The ID to use for the plugin instance, which will become the
    +   * final component of the plugin instance's resource name. This field is
    +   * optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another plugin instance in the plugin
    +   * resource.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginInstanceId. + */ + java.lang.String getPluginInstanceId(); + + /** + * + * + *
    +   * Optional. The ID to use for the plugin instance, which will become the
    +   * final component of the plugin instance's resource name. This field is
    +   * optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another plugin instance in the plugin
    +   * resource.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, and valid characters
    +   * are /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_instance_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginInstanceId. + */ + com.google.protobuf.ByteString getPluginInstanceIdBytes(); + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pluginInstance field is set. + */ + boolean hasPluginInstance(); + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pluginInstance. + */ + com.google.cloud.apihub.v1.PluginInstance getPluginInstance(); + + /** + * + * + *
    +   * Required. The plugin instance to create.
    +   * 
    + * + * + * .google.cloud.apihub.v1.PluginInstance plugin_instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.PluginInstanceOrBuilder getPluginInstanceOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequest.java new file mode 100644 index 000000000000..f14e7229acce --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequest.java @@ -0,0 +1,1224 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [CreatePlugin][google.cloud.apihub.v1.ApiHubPlugin.CreatePlugin] method's
    + * request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreatePluginRequest} + */ +public final class CreatePluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CreatePluginRequest) + CreatePluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePluginRequest.newBuilder() to construct. + private CreatePluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePluginRequest() { + parent_ = ""; + pluginId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreatePluginRequest.class, + com.google.cloud.apihub.v1.CreatePluginRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
    +   * Required. The parent resource where this plugin will be created.
    +   * Format: `projects/{project}/locations/{location}`.
    +   * 
    + * + * + * 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 plugin will be created.
    +   * Format: `projects/{project}/locations/{location}`.
    +   * 
    + * + * + * 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 PLUGIN_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginId_ = ""; + + /** + * + * + *
    +   * Optional. The ID to use for the Plugin resource, which will become the
    +   * final component of the Plugin's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another Plugin resource in the API hub
    +   * instance.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, overall resource name which will be
    +   * of format
    +   * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +   * its length is limited to 1000 characters and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginId. + */ + @java.lang.Override + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The ID to use for the Plugin resource, which will become the
    +   * final component of the Plugin's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another Plugin resource in the API hub
    +   * instance.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, overall resource name which will be
    +   * of format
    +   * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +   * its length is limited to 1000 characters and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLUGIN_FIELD_NUMBER = 3; + private com.google.cloud.apihub.v1.Plugin plugin_; + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plugin field is set. + */ + @java.lang.Override + public boolean hasPlugin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plugin. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Plugin getPlugin() { + return plugin_ == null ? com.google.cloud.apihub.v1.Plugin.getDefaultInstance() : plugin_; + } + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.PluginOrBuilder getPluginOrBuilder() { + return plugin_ == null ? com.google.cloud.apihub.v1.Plugin.getDefaultInstance() : plugin_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(pluginId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pluginId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPlugin()); + } + 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(pluginId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pluginId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlugin()); + } + 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.apihub.v1.CreatePluginRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CreatePluginRequest other = + (com.google.cloud.apihub.v1.CreatePluginRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPluginId().equals(other.getPluginId())) return false; + if (hasPlugin() != other.hasPlugin()) return false; + if (hasPlugin()) { + if (!getPlugin().equals(other.getPlugin())) 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) + PLUGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getPluginId().hashCode(); + if (hasPlugin()) { + hash = (37 * hash) + PLUGIN_FIELD_NUMBER; + hash = (53 * hash) + getPlugin().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest 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.apihub.v1.CreatePluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom( + 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.apihub.v1.CreatePluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom( + java.io.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.apihub.v1.CreatePluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseDelimitedFrom( + java.io.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.apihub.v1.CreatePluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CreatePluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [CreatePlugin][google.cloud.apihub.v1.ApiHubPlugin.CreatePlugin] method's
    +   * request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CreatePluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CreatePluginRequest) + com.google.cloud.apihub.v1.CreatePluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CreatePluginRequest.class, + com.google.cloud.apihub.v1.CreatePluginRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CreatePluginRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPluginFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pluginId_ = ""; + plugin_ = null; + if (pluginBuilder_ != null) { + pluginBuilder_.dispose(); + pluginBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CreatePluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CreatePluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginRequest build() { + com.google.cloud.apihub.v1.CreatePluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CreatePluginRequest buildPartial() { + com.google.cloud.apihub.v1.CreatePluginRequest result = + new com.google.cloud.apihub.v1.CreatePluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CreatePluginRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pluginId_ = pluginId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.plugin_ = pluginBuilder_ == null ? plugin_ : pluginBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CreatePluginRequest) { + return mergeFrom((com.google.cloud.apihub.v1.CreatePluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CreatePluginRequest other) { + if (other == com.google.cloud.apihub.v1.CreatePluginRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPluginId().isEmpty()) { + pluginId_ = other.pluginId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPlugin()) { + mergePlugin(other.getPlugin()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pluginId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPluginFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
    +     * Required. The parent resource where this plugin will be created.
    +     * Format: `projects/{project}/locations/{location}`.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The parent resource where this plugin will be created.
    +     * Format: `projects/{project}/locations/{location}`.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The parent resource where this plugin will be created.
    +     * Format: `projects/{project}/locations/{location}`.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource where this plugin will be created.
    +     * Format: `projects/{project}/locations/{location}`.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The parent resource where this plugin will be created.
    +     * Format: `projects/{project}/locations/{location}`.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pluginId_ = ""; + + /** + * + * + *
    +     * Optional. The ID to use for the Plugin resource, which will become the
    +     * final component of the Plugin's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another Plugin resource in the API hub
    +     * instance.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, overall resource name which will be
    +     * of format
    +     * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +     * its length is limited to 1000 characters and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginId. + */ + public java.lang.String getPluginId() { + java.lang.Object ref = pluginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the Plugin resource, which will become the
    +     * final component of the Plugin's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another Plugin resource in the API hub
    +     * instance.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, overall resource name which will be
    +     * of format
    +     * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +     * its length is limited to 1000 characters and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginId. + */ + public com.google.protobuf.ByteString getPluginIdBytes() { + java.lang.Object ref = pluginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The ID to use for the Plugin resource, which will become the
    +     * final component of the Plugin's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another Plugin resource in the API hub
    +     * instance.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, overall resource name which will be
    +     * of format
    +     * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +     * its length is limited to 1000 characters and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pluginId to set. + * @return This builder for chaining. + */ + public Builder setPluginId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the Plugin resource, which will become the
    +     * final component of the Plugin's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another Plugin resource in the API hub
    +     * instance.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, overall resource name which will be
    +     * of format
    +     * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +     * its length is limited to 1000 characters and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPluginId() { + pluginId_ = getDefaultInstance().getPluginId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The ID to use for the Plugin resource, which will become the
    +     * final component of the Plugin's resource name. This field is optional.
    +     *
    +     * * If provided, the same will be used. The service will throw an error if
    +     * the specified id is already used by another Plugin resource in the API hub
    +     * instance.
    +     * * If not provided, a system generated id will be used.
    +     *
    +     * This value should be 4-63 characters, overall resource name which will be
    +     * of format
    +     * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +     * its length is limited to 1000 characters and valid characters are
    +     * /[a-z][A-Z][0-9]-_/.
    +     * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pluginId to set. + * @return This builder for chaining. + */ + public Builder setPluginIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Plugin plugin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Plugin, + com.google.cloud.apihub.v1.Plugin.Builder, + com.google.cloud.apihub.v1.PluginOrBuilder> + pluginBuilder_; + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plugin field is set. + */ + public boolean hasPlugin() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plugin. + */ + public com.google.cloud.apihub.v1.Plugin getPlugin() { + if (pluginBuilder_ == null) { + return plugin_ == null ? com.google.cloud.apihub.v1.Plugin.getDefaultInstance() : plugin_; + } else { + return pluginBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlugin(com.google.cloud.apihub.v1.Plugin value) { + if (pluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plugin_ = value; + } else { + pluginBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlugin(com.google.cloud.apihub.v1.Plugin.Builder builderForValue) { + if (pluginBuilder_ == null) { + plugin_ = builderForValue.build(); + } else { + pluginBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlugin(com.google.cloud.apihub.v1.Plugin value) { + if (pluginBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && plugin_ != null + && plugin_ != com.google.cloud.apihub.v1.Plugin.getDefaultInstance()) { + getPluginBuilder().mergeFrom(value); + } else { + plugin_ = value; + } + } else { + pluginBuilder_.mergeFrom(value); + } + if (plugin_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlugin() { + bitField0_ = (bitField0_ & ~0x00000004); + plugin_ = null; + if (pluginBuilder_ != null) { + pluginBuilder_.dispose(); + pluginBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Plugin.Builder getPluginBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPluginFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.PluginOrBuilder getPluginOrBuilder() { + if (pluginBuilder_ != null) { + return pluginBuilder_.getMessageOrBuilder(); + } else { + return plugin_ == null ? com.google.cloud.apihub.v1.Plugin.getDefaultInstance() : plugin_; + } + } + + /** + * + * + *
    +     * Required. The plugin to create.
    +     * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Plugin, + com.google.cloud.apihub.v1.Plugin.Builder, + com.google.cloud.apihub.v1.PluginOrBuilder> + getPluginFieldBuilder() { + if (pluginBuilder_ == null) { + pluginBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Plugin, + com.google.cloud.apihub.v1.Plugin.Builder, + com.google.cloud.apihub.v1.PluginOrBuilder>( + getPlugin(), getParentForChildren(), isClean()); + plugin_ = null; + } + return pluginBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.CreatePluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CreatePluginRequest) + private static final com.google.cloud.apihub.v1.CreatePluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CreatePluginRequest(); + } + + public static com.google.cloud.apihub.v1.CreatePluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePluginRequest 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.apihub.v1.CreatePluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequestOrBuilder.java new file mode 100644 index 000000000000..6fc4ed3331a6 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreatePluginRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CreatePluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CreatePluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent resource where this plugin will be created.
    +   * Format: `projects/{project}/locations/{location}`.
    +   * 
    + * + * + * 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 plugin will be created.
    +   * Format: `projects/{project}/locations/{location}`.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Optional. The ID to use for the Plugin resource, which will become the
    +   * final component of the Plugin's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another Plugin resource in the API hub
    +   * instance.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, overall resource name which will be
    +   * of format
    +   * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +   * its length is limited to 1000 characters and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pluginId. + */ + java.lang.String getPluginId(); + + /** + * + * + *
    +   * Optional. The ID to use for the Plugin resource, which will become the
    +   * final component of the Plugin's resource name. This field is optional.
    +   *
    +   * * If provided, the same will be used. The service will throw an error if
    +   * the specified id is already used by another Plugin resource in the API hub
    +   * instance.
    +   * * If not provided, a system generated id will be used.
    +   *
    +   * This value should be 4-63 characters, overall resource name which will be
    +   * of format
    +   * `projects/{project}/locations/{location}/plugins/{plugin}`,
    +   * its length is limited to 1000 characters and valid characters are
    +   * /[a-z][A-Z][0-9]-_/.
    +   * 
    + * + * string plugin_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pluginId. + */ + com.google.protobuf.ByteString getPluginIdBytes(); + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plugin field is set. + */ + boolean hasPlugin(); + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plugin. + */ + com.google.cloud.apihub.v1.Plugin getPlugin(); + + /** + * + * + *
    +   * Required. The plugin to create.
    +   * 
    + * + * .google.cloud.apihub.v1.Plugin plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.PluginOrBuilder getPluginOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequest.java index 65b014d508d0..8e4eda4b6cc8 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequest.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequest.java @@ -144,8 +144,11 @@ public com.google.protobuf.ByteString getParentBytes() { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -177,8 +180,11 @@ public java.lang.String getSpecId() { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -801,8 +807,11 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -833,8 +842,11 @@ public java.lang.String getSpecId() { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -865,8 +877,11 @@ public com.google.protobuf.ByteString getSpecIdBytes() { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -896,8 +911,11 @@ public Builder setSpecId(java.lang.String value) { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -923,8 +941,11 @@ public Builder clearSpecId() { * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequestOrBuilder.java index 2dc465a8faab..0cf8b88f02eb 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequestOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateSpecRequestOrBuilder.java @@ -70,8 +70,11 @@ public interface CreateSpecRequestOrBuilder * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -92,8 +95,11 @@ public interface CreateSpecRequestOrBuilder * resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`, + * its length is limited to 1000 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequest.java index 1b1ca49ae17e..f5f7d3845881 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequest.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequest.java @@ -142,8 +142,11 @@ public com.google.protobuf.ByteString getParentBytes() { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -174,8 +177,11 @@ public java.lang.String getVersionId() { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -797,8 +803,11 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -828,8 +837,11 @@ public java.lang.String getVersionId() { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -859,8 +871,11 @@ public com.google.protobuf.ByteString getVersionIdBytes() { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -889,8 +904,11 @@ public Builder setVersionId(java.lang.String value) { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -915,8 +933,11 @@ public Builder clearVersionId() { * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequestOrBuilder.java index 54c4a23f10b7..e8b8d865d427 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequestOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CreateVersionRequestOrBuilder.java @@ -67,8 +67,11 @@ public interface CreateVersionRequestOrBuilder * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -88,8 +91,11 @@ public interface CreateVersionRequestOrBuilder * the specified id is already used by another version in the API resource. * * If not provided, a system generated id will be used. * - * This value should be 4-500 characters, and valid characters - * are /[a-z][A-Z][0-9]-_/. + * This value should be 4-500 characters, overall resource name which will be + * of format + * `projects/{project}/locations/{location}/apis/{api}/versions/{version}`, + * its length is limited to 700 characters and valid characters are + * /[a-z][A-Z][0-9]-_/. * * * string version_id = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurateServiceProto.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurateServiceProto.java new file mode 100644 index 000000000000..714d5f460d58 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurateServiceProto.java @@ -0,0 +1,294 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public final class CurateServiceProto { + private CurateServiceProto() {} + + 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_apihub_v1_CreateCurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_CreateCurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_GetCurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_GetCurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_UpdateCurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_UpdateCurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_DeleteCurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ListCurationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ListCurationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ListCurationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ListCurationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_Curation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_Curation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "+google/cloud/apihub/v1/curate_service." + + "proto\022\026google.cloud.apihub.v1\032\034google/ap" + + "i/annotations.proto\032\027google/api/client.p" + + "roto\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\242\001\n" + + "\025CreateCurationRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036apihub.googleapis.com/Curation\022\030\n" + + "\013curation_id\030\002 \001(\tB\003\340A\001\0227\n" + + "\010curation\030\003 \001(\0132 .google.cloud.apihub.v1.CurationB\003\340A\002\"J\n" + + "\022GetCurationRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036apihub.googleapis.com/Curation\"\206\001\n" + + "\025UpdateCurationRequest\0227\n" + + "\010curation\030\001 \001(\0132 .google.cloud.apihub.v1.CurationB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"M\n" + + "\025DeleteCurationRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036apihub.googleapis.com/Curation\"\224\001\n" + + "\024ListCurationsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036apihub.googleapis.com/Curation\022\023\n" + + "\006filter\030\002 \001(\tB\003\340A\001\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\"e\n" + + "\025ListCurationsResponse\0223\n" + + "\tcurations\030\001 \003(\0132 .google.cloud.apihub.v1.Curation\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\304\007\n" + + "\010Curation\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\0227\n" + + "\010endpoint\030\004 \001(\0132 .google.cloud.apihub.v1.EndpointB\003\340A\002\022]\n" + + "\027plugin_instance_actions\030\005" + + " \003(\01327.google.cloud.apihub.v1.Curation.PluginInstanceActionIDB\003\340A\003\022V\n" + + "\024last_execution_state\030\006" + + " \001(\01623.google.cloud.apihub.v1.Curation.LastExecutionStateB\003\340A\003\022R\n" + + "\031last_execution_error_code\030\007 \001(\0162*.google" + + ".cloud.apihub.v1.Curation.ErrorCodeB\003\340A\003\022)\n" + + "\034last_execution_error_message\030\010 \001(\tB\003\340A\003\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032w\n" + + "\026PluginInstanceActionID\022E\n" + + "\017plugin_instance\030\001 \001(\tB,\340A\003\372A&\n" + + "$apihub.googleapis.com/PluginInstance\022\026\n" + + "\taction_id\030\002 \001(\tB\003\340A\003\"U\n" + + "\022LastExecutionState\022$\n" + + " LAST_EXECUTION_STATE_UNSPECIFIED\020\000\022\r\n" + + "\tSUCCEEDED\020\001\022\n\n" + + "\006FAILED\020\002\"M\n" + + "\tErrorCode\022\032\n" + + "\026ERROR_CODE_UNSPECIFIED\020\000\022\022\n" + + "\016INTERNAL_ERROR\020\001\022\020\n" + + "\014UNAUTHORIZED\020\002:v\352As\n" + + "\036apihub.googleapis.com/Curation\022\332A\006p" + + "arent\202\323\344\223\002/\022-/v1/{parent=projects/*/locations/*}/curations\022\302\001\n" + + "\016UpdateCuration\022-.google.cloud.apihub.v1.UpdateCurationRequest\032" + + " .google.cloud.apihub.v1.Curation\"_" + + "\332A\024curation,update_mask\202\323\344\223\002B26/v1/{cura" + + "tion.name=projects/*/locations/*/curations/*}:\010curation\022\225\001\n" + + "\016DeleteCuration\022-.google.cloud.apihub.v1.DeleteCurationReques" + + "t\032\026.google.protobuf.Empty\"<\332A\004name\202\323\344\223\002/" + + "*-/v1/{name=projects/*/locations/*/curat" + + "ions/*}\032I\312A\025apihub.googleapis.com\322A.http" + + "s://www.googleapis.com/auth/cloud-platformB\264\001\n" + + "\032com.google.cloud.apihub.v1B\022CurateServiceProtoP\001Z2cloud.google.com/go/api" + + "hub/apiv1/apihubpb;apihubpb\252\002\026Google.Clo" + + "ud.ApiHub.V1\312\002\026Google\\Cloud\\ApiHub\\V1\352\002\031" + + "Google::Cloud::ApiHub::V1b\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.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_apihub_v1_CreateCurationRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_apihub_v1_CreateCurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_CreateCurationRequest_descriptor, + new java.lang.String[] { + "Parent", "CurationId", "Curation", + }); + internal_static_google_cloud_apihub_v1_GetCurationRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_apihub_v1_GetCurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_GetCurationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_apihub_v1_UpdateCurationRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_apihub_v1_UpdateCurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_UpdateCurationRequest_descriptor, + new java.lang.String[] { + "Curation", "UpdateMask", + }); + internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_apihub_v1_DeleteCurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_apihub_v1_ListCurationsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_apihub_v1_ListCurationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ListCurationsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_apihub_v1_ListCurationsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_apihub_v1_ListCurationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ListCurationsResponse_descriptor, + new java.lang.String[] { + "Curations", "NextPageToken", + }); + internal_static_google_cloud_apihub_v1_Curation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_apihub_v1_Curation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_Curation_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "Endpoint", + "PluginInstanceActions", + "LastExecutionState", + "LastExecutionErrorCode", + "LastExecutionErrorMessage", + "CreateTime", + "UpdateTime", + }); + internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor = + internal_static_google_cloud_apihub_v1_Curation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor, + new java.lang.String[] { + "PluginInstance", "ActionId", + }); + internal_static_google_cloud_apihub_v1_Endpoint_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_apihub_v1_Endpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_Endpoint_descriptor, + new java.lang.String[] { + "ApplicationIntegrationEndpointDetails", "EndpointDetails", + }); + internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_apihub_v1_ApplicationIntegrationEndpointDetails_descriptor, + new java.lang.String[] { + "Uri", "TriggerId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Curation.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Curation.java new file mode 100644 index 000000000000..458847cb69d8 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Curation.java @@ -0,0 +1,4375 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * A curation resource in the API Hub.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.Curation} + */ +public final class Curation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.Curation) + CurationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Curation.newBuilder() to construct. + private Curation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Curation() { + name_ = ""; + displayName_ = ""; + description_ = ""; + pluginInstanceActions_ = java.util.Collections.emptyList(); + lastExecutionState_ = 0; + lastExecutionErrorCode_ = 0; + lastExecutionErrorMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Curation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.Curation.class, + com.google.cloud.apihub.v1.Curation.Builder.class); + } + + /** + * + * + *
    +   * The state of the last execution of the curation.
    +   * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.Curation.LastExecutionState} + */ + public enum LastExecutionState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Default unspecified state.
    +     * 
    + * + * LAST_EXECUTION_STATE_UNSPECIFIED = 0; + */ + LAST_EXECUTION_STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The last curation execution was successful.
    +     * 
    + * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
    +     * The last curation execution failed.
    +     * 
    + * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Default unspecified state.
    +     * 
    + * + * LAST_EXECUTION_STATE_UNSPECIFIED = 0; + */ + public static final int LAST_EXECUTION_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * The last curation execution was successful.
    +     * 
    + * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + + /** + * + * + *
    +     * The last curation execution failed.
    +     * 
    + * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LastExecutionState 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 LastExecutionState forNumber(int value) { + switch (value) { + case 0: + return LAST_EXECUTION_STATE_UNSPECIFIED; + case 1: + return SUCCEEDED; + case 2: + return FAILED; + 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 LastExecutionState findValueByNumber(int number) { + return LastExecutionState.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.apihub.v1.Curation.getDescriptor().getEnumTypes().get(0); + } + + private static final LastExecutionState[] VALUES = values(); + + public static LastExecutionState 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 LastExecutionState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.Curation.LastExecutionState) + } + + /** + * + * + *
    +   * The error codes for failed executions.
    +   * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.Curation.ErrorCode} + */ + public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Default unspecified error code.
    +     * 
    + * + * ERROR_CODE_UNSPECIFIED = 0; + */ + ERROR_CODE_UNSPECIFIED(0), + /** + * + * + *
    +     * The execution failed due to an internal error.
    +     * 
    + * + * INTERNAL_ERROR = 1; + */ + INTERNAL_ERROR(1), + /** + * + * + *
    +     * The curation is not authorized to trigger the endpoint uri.
    +     * 
    + * + * UNAUTHORIZED = 2; + */ + UNAUTHORIZED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Default unspecified error code.
    +     * 
    + * + * ERROR_CODE_UNSPECIFIED = 0; + */ + public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * The execution failed due to an internal error.
    +     * 
    + * + * INTERNAL_ERROR = 1; + */ + public static final int INTERNAL_ERROR_VALUE = 1; + + /** + * + * + *
    +     * The curation is not authorized to trigger the endpoint uri.
    +     * 
    + * + * UNAUTHORIZED = 2; + */ + public static final int UNAUTHORIZED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ErrorCode 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 ErrorCode forNumber(int value) { + switch (value) { + case 0: + return ERROR_CODE_UNSPECIFIED; + case 1: + return INTERNAL_ERROR; + case 2: + return UNAUTHORIZED; + 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 ErrorCode findValueByNumber(int number) { + return ErrorCode.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.apihub.v1.Curation.getDescriptor().getEnumTypes().get(1); + } + + private static final ErrorCode[] VALUES = values(); + + public static ErrorCode 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 ErrorCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.Curation.ErrorCode) + } + + public interface PluginInstanceActionIDOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.Curation.PluginInstanceActionID) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Output only. Plugin instance that is using the curation.
    +     * Format is
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + java.lang.String getPluginInstance(); + + /** + * + * + *
    +     * Output only. Plugin instance that is using the curation.
    +     * Format is
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + com.google.protobuf.ByteString getPluginInstanceBytes(); + + /** + * + * + *
    +     * Output only. The action ID that is using the curation.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The actionId. + */ + java.lang.String getActionId(); + + /** + * + * + *
    +     * Output only. The action ID that is using the curation.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for actionId. + */ + com.google.protobuf.ByteString getActionIdBytes(); + } + + /** + * + * + *
    +   * The plugin instance and associated action that is using the curation.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.Curation.PluginInstanceActionID} + */ + public static final class PluginInstanceActionID extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.Curation.PluginInstanceActionID) + PluginInstanceActionIDOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PluginInstanceActionID.newBuilder() to construct. + private PluginInstanceActionID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PluginInstanceActionID() { + pluginInstance_ = ""; + actionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PluginInstanceActionID(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.class, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder.class); + } + + public static final int PLUGIN_INSTANCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginInstance_ = ""; + + /** + * + * + *
    +     * Output only. Plugin instance that is using the curation.
    +     * Format is
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + @java.lang.Override + public java.lang.String getPluginInstance() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstance_ = s; + return s; + } + } + + /** + * + * + *
    +     * Output only. Plugin instance that is using the curation.
    +     * Format is
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginInstanceBytes() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object actionId_ = ""; + + /** + * + * + *
    +     * Output only. The action ID that is using the curation.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The actionId. + */ + @java.lang.Override + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } + } + + /** + * + * + *
    +     * Output only. The action ID that is using the curation.
    +     * This should map to one of the action IDs specified
    +     * in action configs in the plugin.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for actionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = 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(pluginInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pluginInstance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, actionId_); + } + 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(pluginInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pluginInstance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, actionId_); + } + 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.apihub.v1.Curation.PluginInstanceActionID)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID other = + (com.google.cloud.apihub.v1.Curation.PluginInstanceActionID) obj; + + if (!getPluginInstance().equals(other.getPluginInstance())) return false; + if (!getActionId().equals(other.getActionId())) 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) + PLUGIN_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getPluginInstance().hashCode(); + hash = (37 * hash) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID 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.apihub.v1.Curation.PluginInstanceActionID parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + 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.apihub.v1.Curation.PluginInstanceActionID parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + java.io.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.apihub.v1.Curation.PluginInstanceActionID parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseDelimitedFrom( + java.io.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.apihub.v1.Curation.PluginInstanceActionID parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.Curation.PluginInstanceActionID prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * The plugin instance and associated action that is using the curation.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.Curation.PluginInstanceActionID} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.Curation.PluginInstanceActionID) + com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.class, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pluginInstance_ = ""; + actionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_PluginInstanceActionID_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID build() { + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID buildPartial() { + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID result = + new com.google.cloud.apihub.v1.Curation.PluginInstanceActionID(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pluginInstance_ = pluginInstance_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionId_ = actionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.Curation.PluginInstanceActionID) { + return mergeFrom((com.google.cloud.apihub.v1.Curation.PluginInstanceActionID) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.Curation.PluginInstanceActionID other) { + if (other + == com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.getDefaultInstance()) + return this; + if (!other.getPluginInstance().isEmpty()) { + pluginInstance_ = other.pluginInstance_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getActionId().isEmpty()) { + actionId_ = other.actionId_; + bitField0_ |= 0x00000002; + 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: + { + pluginInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + actionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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.lang.Object pluginInstance_ = ""; + + /** + * + * + *
    +       * Output only. Plugin instance that is using the curation.
    +       * Format is
    +       * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +       * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The pluginInstance. + */ + public java.lang.String getPluginInstance() { + java.lang.Object ref = pluginInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Output only. Plugin instance that is using the curation.
    +       * Format is
    +       * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +       * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for pluginInstance. + */ + public com.google.protobuf.ByteString getPluginInstanceBytes() { + java.lang.Object ref = pluginInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Output only. Plugin instance that is using the curation.
    +       * Format is
    +       * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +       * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The pluginInstance to set. + * @return This builder for chaining. + */ + public Builder setPluginInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginInstance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. Plugin instance that is using the curation.
    +       * Format is
    +       * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +       * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPluginInstance() { + pluginInstance_ = getDefaultInstance().getPluginInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. Plugin instance that is using the curation.
    +       * Format is
    +       * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +       * 
    + * + * + * string plugin_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for pluginInstance to set. + * @return This builder for chaining. + */ + public Builder setPluginInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginInstance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object actionId_ = ""; + + /** + * + * + *
    +       * Output only. The action ID that is using the curation.
    +       * This should map to one of the action IDs specified
    +       * in action configs in the plugin.
    +       * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The actionId. + */ + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Output only. The action ID that is using the curation.
    +       * This should map to one of the action IDs specified
    +       * in action configs in the plugin.
    +       * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for actionId. + */ + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Output only. The action ID that is using the curation.
    +       * This should map to one of the action IDs specified
    +       * in action configs in the plugin.
    +       * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. The action ID that is using the curation.
    +       * This should map to one of the action IDs specified
    +       * in action configs in the plugin.
    +       * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + actionId_ = getDefaultInstance().getActionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. The action ID that is using the curation.
    +       * This should map to one of the action IDs specified
    +       * in action configs in the plugin.
    +       * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for actionId to set. + * @return This builder for chaining. + */ + public Builder setActionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionId_ = value; + bitField0_ |= 0x00000002; + 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.apihub.v1.Curation.PluginInstanceActionID) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.Curation.PluginInstanceActionID) + private static final com.google.cloud.apihub.v1.Curation.PluginInstanceActionID + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.Curation.PluginInstanceActionID(); + } + + public static com.google.cloud.apihub.v1.Curation.PluginInstanceActionID getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PluginInstanceActionID 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.apihub.v1.Curation.PluginInstanceActionID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Identifier. The name of the curation.
    +   *
    +   * Format:
    +   * `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
    +   * Identifier. The name of the curation.
    +   *
    +   * Format:
    +   * `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
    +   * Required. The display name of the curation.
    +   * 
    + * + * 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. The display name of the curation.
    +   * 
    + * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
    +   * Optional. The description of the curation.
    +   * 
    + * + * 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. The description of the curation.
    +   * 
    + * + * 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 ENDPOINT_FIELD_NUMBER = 4; + private com.google.cloud.apihub.v1.Endpoint endpoint_; + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + @java.lang.Override + public boolean hasEndpoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Endpoint getEndpoint() { + return endpoint_ == null ? com.google.cloud.apihub.v1.Endpoint.getDefaultInstance() : endpoint_; + } + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.EndpointOrBuilder getEndpointOrBuilder() { + return endpoint_ == null ? com.google.cloud.apihub.v1.Endpoint.getDefaultInstance() : endpoint_; + } + + public static final int PLUGIN_INSTANCE_ACTIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List + pluginInstanceActions_; + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPluginInstanceActionsList() { + return pluginInstanceActions_; + } + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder> + getPluginInstanceActionsOrBuilderList() { + return pluginInstanceActions_; + } + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPluginInstanceActionsCount() { + return pluginInstanceActions_.size(); + } + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID getPluginInstanceActions( + int index) { + return pluginInstanceActions_.get(index); + } + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder + getPluginInstanceActionsOrBuilder(int index) { + return pluginInstanceActions_.get(index); + } + + public static final int LAST_EXECUTION_STATE_FIELD_NUMBER = 6; + private int lastExecutionState_ = 0; + + /** + * + * + *
    +   * Output only. The last execution state of the curation.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionState. + */ + @java.lang.Override + public int getLastExecutionStateValue() { + return lastExecutionState_; + } + + /** + * + * + *
    +   * Output only. The last execution state of the curation.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionState. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.LastExecutionState getLastExecutionState() { + com.google.cloud.apihub.v1.Curation.LastExecutionState result = + com.google.cloud.apihub.v1.Curation.LastExecutionState.forNumber(lastExecutionState_); + return result == null + ? com.google.cloud.apihub.v1.Curation.LastExecutionState.UNRECOGNIZED + : result; + } + + public static final int LAST_EXECUTION_ERROR_CODE_FIELD_NUMBER = 7; + private int lastExecutionErrorCode_ = 0; + + /** + * + * + *
    +   * Output only. The error code of the last execution of the curation. The
    +   * error code is populated only when the last execution state is failed.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionErrorCode. + */ + @java.lang.Override + public int getLastExecutionErrorCodeValue() { + return lastExecutionErrorCode_; + } + + /** + * + * + *
    +   * Output only. The error code of the last execution of the curation. The
    +   * error code is populated only when the last execution state is failed.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorCode. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.ErrorCode getLastExecutionErrorCode() { + com.google.cloud.apihub.v1.Curation.ErrorCode result = + com.google.cloud.apihub.v1.Curation.ErrorCode.forNumber(lastExecutionErrorCode_); + return result == null ? com.google.cloud.apihub.v1.Curation.ErrorCode.UNRECOGNIZED : result; + } + + public static final int LAST_EXECUTION_ERROR_MESSAGE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object lastExecutionErrorMessage_ = ""; + + /** + * + * + *
    +   * Output only. Error message describing the failure, if any, during the last
    +   * execution of the curation.
    +   * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorMessage. + */ + @java.lang.Override + public java.lang.String getLastExecutionErrorMessage() { + java.lang.Object ref = lastExecutionErrorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastExecutionErrorMessage_ = s; + return s; + } + } + + /** + * + * + *
    +   * Output only. Error message describing the failure, if any, during the last
    +   * execution of the curation.
    +   * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for lastExecutionErrorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastExecutionErrorMessageBytes() { + java.lang.Object ref = lastExecutionErrorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastExecutionErrorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getEndpoint()); + } + for (int i = 0; i < pluginInstanceActions_.size(); i++) { + output.writeMessage(5, pluginInstanceActions_.get(i)); + } + if (lastExecutionState_ + != com.google.cloud.apihub.v1.Curation.LastExecutionState.LAST_EXECUTION_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, lastExecutionState_); + } + if (lastExecutionErrorCode_ + != com.google.cloud.apihub.v1.Curation.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, lastExecutionErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastExecutionErrorMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, lastExecutionErrorMessage_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndpoint()); + } + for (int i = 0; i < pluginInstanceActions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, pluginInstanceActions_.get(i)); + } + if (lastExecutionState_ + != com.google.cloud.apihub.v1.Curation.LastExecutionState.LAST_EXECUTION_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, lastExecutionState_); + } + if (lastExecutionErrorCode_ + != com.google.cloud.apihub.v1.Curation.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, lastExecutionErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastExecutionErrorMessage_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(8, lastExecutionErrorMessage_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + 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.apihub.v1.Curation)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.Curation other = (com.google.cloud.apihub.v1.Curation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasEndpoint() != other.hasEndpoint()) return false; + if (hasEndpoint()) { + if (!getEndpoint().equals(other.getEndpoint())) return false; + } + if (!getPluginInstanceActionsList().equals(other.getPluginInstanceActionsList())) return false; + if (lastExecutionState_ != other.lastExecutionState_) return false; + if (lastExecutionErrorCode_ != other.lastExecutionErrorCode_) return false; + if (!getLastExecutionErrorMessage().equals(other.getLastExecutionErrorMessage())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!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(); + if (hasEndpoint()) { + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + } + if (getPluginInstanceActionsCount() > 0) { + hash = (37 * hash) + PLUGIN_INSTANCE_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPluginInstanceActionsList().hashCode(); + } + hash = (37 * hash) + LAST_EXECUTION_STATE_FIELD_NUMBER; + hash = (53 * hash) + lastExecutionState_; + hash = (37 * hash) + LAST_EXECUTION_ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + lastExecutionErrorCode_; + hash = (37 * hash) + LAST_EXECUTION_ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getLastExecutionErrorMessage().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.Curation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation 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.apihub.v1.Curation parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation parseFrom( + 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.apihub.v1.Curation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.Curation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.Curation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation parseFrom( + java.io.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.apihub.v1.Curation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation parseDelimitedFrom( + java.io.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.apihub.v1.Curation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.Curation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.Curation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 curation resource in the API Hub.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.Curation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.Curation) + com.google.cloud.apihub.v1.CurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.Curation.class, + com.google.cloud.apihub.v1.Curation.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.Curation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEndpointFieldBuilder(); + getPluginInstanceActionsFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + endpoint_ = null; + if (endpointBuilder_ != null) { + endpointBuilder_.dispose(); + endpointBuilder_ = null; + } + if (pluginInstanceActionsBuilder_ == null) { + pluginInstanceActions_ = java.util.Collections.emptyList(); + } else { + pluginInstanceActions_ = null; + pluginInstanceActionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + lastExecutionState_ = 0; + lastExecutionErrorCode_ = 0; + lastExecutionErrorMessage_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_Curation_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.Curation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation build() { + com.google.cloud.apihub.v1.Curation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.Curation buildPartial() { + com.google.cloud.apihub.v1.Curation result = new com.google.cloud.apihub.v1.Curation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.Curation result) { + if (pluginInstanceActionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + pluginInstanceActions_ = java.util.Collections.unmodifiableList(pluginInstanceActions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.pluginInstanceActions_ = pluginInstanceActions_; + } else { + result.pluginInstanceActions_ = pluginInstanceActionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.apihub.v1.Curation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.lastExecutionState_ = lastExecutionState_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastExecutionErrorCode_ = lastExecutionErrorCode_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.lastExecutionErrorMessage_ = lastExecutionErrorMessage_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.Curation) { + return mergeFrom((com.google.cloud.apihub.v1.Curation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.Curation other) { + if (other == com.google.cloud.apihub.v1.Curation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasEndpoint()) { + mergeEndpoint(other.getEndpoint()); + } + if (pluginInstanceActionsBuilder_ == null) { + if (!other.pluginInstanceActions_.isEmpty()) { + if (pluginInstanceActions_.isEmpty()) { + pluginInstanceActions_ = other.pluginInstanceActions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.addAll(other.pluginInstanceActions_); + } + onChanged(); + } + } else { + if (!other.pluginInstanceActions_.isEmpty()) { + if (pluginInstanceActionsBuilder_.isEmpty()) { + pluginInstanceActionsBuilder_.dispose(); + pluginInstanceActionsBuilder_ = null; + pluginInstanceActions_ = other.pluginInstanceActions_; + bitField0_ = (bitField0_ & ~0x00000010); + pluginInstanceActionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPluginInstanceActionsFieldBuilder() + : null; + } else { + pluginInstanceActionsBuilder_.addAllMessages(other.pluginInstanceActions_); + } + } + } + if (other.lastExecutionState_ != 0) { + setLastExecutionStateValue(other.getLastExecutionStateValue()); + } + if (other.lastExecutionErrorCode_ != 0) { + setLastExecutionErrorCodeValue(other.getLastExecutionErrorCodeValue()); + } + if (!other.getLastExecutionErrorMessage().isEmpty()) { + lastExecutionErrorMessage_ = other.lastExecutionErrorMessage_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getEndpointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID m = + input.readMessage( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.parser(), + extensionRegistry); + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.add(m); + } else { + pluginInstanceActionsBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: + { + lastExecutionState_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + lastExecutionErrorCode_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + lastExecutionErrorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Identifier. The name of the curation.
    +     *
    +     * Format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
    +     * Identifier. The name of the curation.
    +     *
    +     * Format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
    +     * Identifier. The name of the curation.
    +     *
    +     * Format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Identifier. The name of the curation.
    +     *
    +     * Format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Identifier. The name of the curation.
    +     *
    +     * Format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
    +     * Required. The display name of the curation.
    +     * 
    + * + * 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. The display name of the curation.
    +     * 
    + * + * 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. The display name of the curation.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The display name of the curation.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The display name of the curation.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
    +     * Optional. The description of the curation.
    +     * 
    + * + * 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. The description of the curation.
    +     * 
    + * + * 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. The description of the curation.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The description of the curation.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The description of the curation.
    +     * 
    + * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.apihub.v1.Endpoint endpoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Endpoint, + com.google.cloud.apihub.v1.Endpoint.Builder, + com.google.cloud.apihub.v1.EndpointOrBuilder> + endpointBuilder_; + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + public boolean hasEndpoint() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + public com.google.cloud.apihub.v1.Endpoint getEndpoint() { + if (endpointBuilder_ == null) { + return endpoint_ == null + ? com.google.cloud.apihub.v1.Endpoint.getDefaultInstance() + : endpoint_; + } else { + return endpointBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.apihub.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + } else { + endpointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoint(com.google.cloud.apihub.v1.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + endpoint_ = builderForValue.build(); + } else { + endpointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndpoint(com.google.cloud.apihub.v1.Endpoint value) { + if (endpointBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endpoint_ != null + && endpoint_ != com.google.cloud.apihub.v1.Endpoint.getDefaultInstance()) { + getEndpointBuilder().mergeFrom(value); + } else { + endpoint_ = value; + } + } else { + endpointBuilder_.mergeFrom(value); + } + if (endpoint_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndpoint() { + bitField0_ = (bitField0_ & ~0x00000008); + endpoint_ = null; + if (endpointBuilder_ != null) { + endpointBuilder_.dispose(); + endpointBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Endpoint.Builder getEndpointBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEndpointFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.EndpointOrBuilder getEndpointOrBuilder() { + if (endpointBuilder_ != null) { + return endpointBuilder_.getMessageOrBuilder(); + } else { + return endpoint_ == null + ? com.google.cloud.apihub.v1.Endpoint.getDefaultInstance() + : endpoint_; + } + } + + /** + * + * + *
    +     * Required. The endpoint to be triggered for curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Endpoint, + com.google.cloud.apihub.v1.Endpoint.Builder, + com.google.cloud.apihub.v1.EndpointOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + endpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Endpoint, + com.google.cloud.apihub.v1.Endpoint.Builder, + com.google.cloud.apihub.v1.EndpointOrBuilder>( + getEndpoint(), getParentForChildren(), isClean()); + endpoint_ = null; + } + return endpointBuilder_; + } + + private java.util.List + pluginInstanceActions_ = java.util.Collections.emptyList(); + + private void ensurePluginInstanceActionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + pluginInstanceActions_ = + new java.util.ArrayList( + pluginInstanceActions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder> + pluginInstanceActionsBuilder_; + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPluginInstanceActionsList() { + if (pluginInstanceActionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pluginInstanceActions_); + } else { + return pluginInstanceActionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPluginInstanceActionsCount() { + if (pluginInstanceActionsBuilder_ == null) { + return pluginInstanceActions_.size(); + } else { + return pluginInstanceActionsBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID getPluginInstanceActions( + int index) { + if (pluginInstanceActionsBuilder_ == null) { + return pluginInstanceActions_.get(index); + } else { + return pluginInstanceActionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPluginInstanceActions( + int index, com.google.cloud.apihub.v1.Curation.PluginInstanceActionID value) { + if (pluginInstanceActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.set(index, value); + onChanged(); + } else { + pluginInstanceActionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPluginInstanceActions( + int index, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder builderForValue) { + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.set(index, builderForValue.build()); + onChanged(); + } else { + pluginInstanceActionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPluginInstanceActions( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID value) { + if (pluginInstanceActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.add(value); + onChanged(); + } else { + pluginInstanceActionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPluginInstanceActions( + int index, com.google.cloud.apihub.v1.Curation.PluginInstanceActionID value) { + if (pluginInstanceActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.add(index, value); + onChanged(); + } else { + pluginInstanceActionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPluginInstanceActions( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder builderForValue) { + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.add(builderForValue.build()); + onChanged(); + } else { + pluginInstanceActionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPluginInstanceActions( + int index, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder builderForValue) { + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.add(index, builderForValue.build()); + onChanged(); + } else { + pluginInstanceActionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPluginInstanceActions( + java.lang.Iterable + values) { + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pluginInstanceActions_); + onChanged(); + } else { + pluginInstanceActionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPluginInstanceActions() { + if (pluginInstanceActionsBuilder_ == null) { + pluginInstanceActions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + pluginInstanceActionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePluginInstanceActions(int index) { + if (pluginInstanceActionsBuilder_ == null) { + ensurePluginInstanceActionsIsMutable(); + pluginInstanceActions_.remove(index); + onChanged(); + } else { + pluginInstanceActionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder + getPluginInstanceActionsBuilder(int index) { + return getPluginInstanceActionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder + getPluginInstanceActionsOrBuilder(int index) { + if (pluginInstanceActionsBuilder_ == null) { + return pluginInstanceActions_.get(index); + } else { + return pluginInstanceActionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder> + getPluginInstanceActionsOrBuilderList() { + if (pluginInstanceActionsBuilder_ != null) { + return pluginInstanceActionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pluginInstanceActions_); + } + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder + addPluginInstanceActionsBuilder() { + return getPluginInstanceActionsFieldBuilder() + .addBuilder( + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder + addPluginInstanceActionsBuilder(int index) { + return getPluginInstanceActionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The plugin instances and associated actions that are using the
    +     * curation. Note: A particular curation could be used by multiple plugin
    +     * instances or multiple actions in a plugin instance.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPluginInstanceActionsBuilderList() { + return getPluginInstanceActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder> + getPluginInstanceActionsFieldBuilder() { + if (pluginInstanceActionsBuilder_ == null) { + pluginInstanceActionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID.Builder, + com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder>( + pluginInstanceActions_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + pluginInstanceActions_ = null; + } + return pluginInstanceActionsBuilder_; + } + + private int lastExecutionState_ = 0; + + /** + * + * + *
    +     * Output only. The last execution state of the curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionState. + */ + @java.lang.Override + public int getLastExecutionStateValue() { + return lastExecutionState_; + } + + /** + * + * + *
    +     * Output only. The last execution state of the curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lastExecutionState to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionStateValue(int value) { + lastExecutionState_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The last execution state of the curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionState. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.LastExecutionState getLastExecutionState() { + com.google.cloud.apihub.v1.Curation.LastExecutionState result = + com.google.cloud.apihub.v1.Curation.LastExecutionState.forNumber(lastExecutionState_); + return result == null + ? com.google.cloud.apihub.v1.Curation.LastExecutionState.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +     * Output only. The last execution state of the curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastExecutionState to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionState( + com.google.cloud.apihub.v1.Curation.LastExecutionState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + lastExecutionState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The last execution state of the curation.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastExecutionState() { + bitField0_ = (bitField0_ & ~0x00000020); + lastExecutionState_ = 0; + onChanged(); + return this; + } + + private int lastExecutionErrorCode_ = 0; + + /** + * + * + *
    +     * Output only. The error code of the last execution of the curation. The
    +     * error code is populated only when the last execution state is failed.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionErrorCode. + */ + @java.lang.Override + public int getLastExecutionErrorCodeValue() { + return lastExecutionErrorCode_; + } + + /** + * + * + *
    +     * Output only. The error code of the last execution of the curation. The
    +     * error code is populated only when the last execution state is failed.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lastExecutionErrorCode to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionErrorCodeValue(int value) { + lastExecutionErrorCode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The error code of the last execution of the curation. The
    +     * error code is populated only when the last execution state is failed.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorCode. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Curation.ErrorCode getLastExecutionErrorCode() { + com.google.cloud.apihub.v1.Curation.ErrorCode result = + com.google.cloud.apihub.v1.Curation.ErrorCode.forNumber(lastExecutionErrorCode_); + return result == null ? com.google.cloud.apihub.v1.Curation.ErrorCode.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Output only. The error code of the last execution of the curation. The
    +     * error code is populated only when the last execution state is failed.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastExecutionErrorCode to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionErrorCode(com.google.cloud.apihub.v1.Curation.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + lastExecutionErrorCode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The error code of the last execution of the curation. The
    +     * error code is populated only when the last execution state is failed.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastExecutionErrorCode() { + bitField0_ = (bitField0_ & ~0x00000040); + lastExecutionErrorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object lastExecutionErrorMessage_ = ""; + + /** + * + * + *
    +     * Output only. Error message describing the failure, if any, during the last
    +     * execution of the curation.
    +     * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorMessage. + */ + public java.lang.String getLastExecutionErrorMessage() { + java.lang.Object ref = lastExecutionErrorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastExecutionErrorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Output only. Error message describing the failure, if any, during the last
    +     * execution of the curation.
    +     * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for lastExecutionErrorMessage. + */ + public com.google.protobuf.ByteString getLastExecutionErrorMessageBytes() { + java.lang.Object ref = lastExecutionErrorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastExecutionErrorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Output only. Error message describing the failure, if any, during the last
    +     * execution of the curation.
    +     * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastExecutionErrorMessage to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lastExecutionErrorMessage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. Error message describing the failure, if any, during the last
    +     * execution of the curation.
    +     * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastExecutionErrorMessage() { + lastExecutionErrorMessage_ = getDefaultInstance().getLastExecutionErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. Error message describing the failure, if any, during the last
    +     * execution of the curation.
    +     * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for lastExecutionErrorMessage to set. + * @return This builder for chaining. + */ + public Builder setLastExecutionErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lastExecutionErrorMessage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
    +     * Output only. The time at which the curation was created.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
    +     * Output only. The time at which the curation was last updated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.Curation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.Curation) + private static final com.google.cloud.apihub.v1.Curation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.Curation(); + } + + public static com.google.cloud.apihub.v1.Curation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Curation 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.apihub.v1.Curation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfig.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfig.java new file mode 100644 index 000000000000..1be7de97a28e --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfig.java @@ -0,0 +1,1706 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The curation information for this plugin instance.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CurationConfig} + */ +public final class CurationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CurationConfig) + CurationConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CurationConfig.newBuilder() to construct. + private CurationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CurationConfig() { + curationType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CurationConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CurationConfig.class, + com.google.cloud.apihub.v1.CurationConfig.Builder.class); + } + + public interface CustomCurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CurationConfig.CustomCuration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Required. The unique name of the curation resource. This will be the name
    +     * of the curation resource in the format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The curation. + */ + java.lang.String getCuration(); + + /** + * + * + *
    +     * Required. The unique name of the curation resource. This will be the name
    +     * of the curation resource in the format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for curation. + */ + com.google.protobuf.ByteString getCurationBytes(); + } + + /** + * + * + *
    +   * Custom curation information for this plugin instance.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CurationConfig.CustomCuration} + */ + public static final class CustomCuration extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.CurationConfig.CustomCuration) + CustomCurationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CustomCuration.newBuilder() to construct. + private CustomCuration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomCuration() { + curation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomCuration(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_CustomCuration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_CustomCuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.class, + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder.class); + } + + public static final int CURATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object curation_ = ""; + + /** + * + * + *
    +     * Required. The unique name of the curation resource. This will be the name
    +     * of the curation resource in the format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The curation. + */ + @java.lang.Override + public java.lang.String getCuration() { + java.lang.Object ref = curation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + curation_ = s; + return s; + } + } + + /** + * + * + *
    +     * Required. The unique name of the curation resource. This will be the name
    +     * of the curation resource in the format:
    +     * `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for curation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurationBytes() { + java.lang.Object ref = curation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + curation_ = 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(curation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, curation_); + } + 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(curation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, curation_); + } + 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.apihub.v1.CurationConfig.CustomCuration)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CurationConfig.CustomCuration other = + (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) obj; + + if (!getCuration().equals(other.getCuration())) 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) + CURATION_FIELD_NUMBER; + hash = (53 * hash) + getCuration().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration 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.apihub.v1.CurationConfig.CustomCuration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + 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.apihub.v1.CurationConfig.CustomCuration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + java.io.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.apihub.v1.CurationConfig.CustomCuration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseDelimitedFrom( + java.io.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.apihub.v1.CurationConfig.CustomCuration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CurationConfig.CustomCuration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +     * Custom curation information for this plugin instance.
    +     * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CurationConfig.CustomCuration} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CurationConfig.CustomCuration) + com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_CustomCuration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_CustomCuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.class, + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CurationConfig.CustomCuration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + curation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_CustomCuration_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration build() { + com.google.cloud.apihub.v1.CurationConfig.CustomCuration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration buildPartial() { + com.google.cloud.apihub.v1.CurationConfig.CustomCuration result = + new com.google.cloud.apihub.v1.CurationConfig.CustomCuration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CurationConfig.CustomCuration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.curation_ = curation_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CurationConfig.CustomCuration) { + return mergeFrom((com.google.cloud.apihub.v1.CurationConfig.CustomCuration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CurationConfig.CustomCuration other) { + if (other == com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance()) + return this; + if (!other.getCuration().isEmpty()) { + curation_ = other.curation_; + bitField0_ |= 0x00000001; + 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: + { + curation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object curation_ = ""; + + /** + * + * + *
    +       * Required. The unique name of the curation resource. This will be the name
    +       * of the curation resource in the format:
    +       * `projects/{project}/locations/{location}/curations/{curation}`
    +       * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The curation. + */ + public java.lang.String getCuration() { + java.lang.Object ref = curation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + curation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Required. The unique name of the curation resource. This will be the name
    +       * of the curation resource in the format:
    +       * `projects/{project}/locations/{location}/curations/{curation}`
    +       * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for curation. + */ + public com.google.protobuf.ByteString getCurationBytes() { + java.lang.Object ref = curation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + curation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Required. The unique name of the curation resource. This will be the name
    +       * of the curation resource in the format:
    +       * `projects/{project}/locations/{location}/curations/{curation}`
    +       * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The curation to set. + * @return This builder for chaining. + */ + public Builder setCuration(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + curation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The unique name of the curation resource. This will be the name
    +       * of the curation resource in the format:
    +       * `projects/{project}/locations/{location}/curations/{curation}`
    +       * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCuration() { + curation_ = getDefaultInstance().getCuration(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Required. The unique name of the curation resource. This will be the name
    +       * of the curation resource in the format:
    +       * `projects/{project}/locations/{location}/curations/{curation}`
    +       * 
    + * + * string curation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for curation to set. + * @return This builder for chaining. + */ + public Builder setCurationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + curation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.CurationConfig.CustomCuration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CurationConfig.CustomCuration) + private static final com.google.cloud.apihub.v1.CurationConfig.CustomCuration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CurationConfig.CustomCuration(); + } + + public static com.google.cloud.apihub.v1.CurationConfig.CustomCuration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomCuration 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.apihub.v1.CurationConfig.CustomCuration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int curationConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object curationConfig_; + + public enum CurationConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CUSTOM_CURATION(2), + CURATIONCONFIG_NOT_SET(0); + private final int value; + + private CurationConfigCase(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 CurationConfigCase valueOf(int value) { + return forNumber(value); + } + + public static CurationConfigCase forNumber(int value) { + switch (value) { + case 2: + return CUSTOM_CURATION; + case 0: + return CURATIONCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CurationConfigCase getCurationConfigCase() { + return CurationConfigCase.forNumber(curationConfigCase_); + } + + public static final int CUSTOM_CURATION_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customCuration field is set. + */ + @java.lang.Override + public boolean hasCustomCuration() { + return curationConfigCase_ == 2; + } + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customCuration. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration getCustomCuration() { + if (curationConfigCase_ == 2) { + return (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_; + } + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder + getCustomCurationOrBuilder() { + if (curationConfigCase_ == 2) { + return (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_; + } + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + + public static final int CURATION_TYPE_FIELD_NUMBER = 1; + private int curationType_ = 0; + + /** + * + * + *
    +   * Required. The curation type for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for curationType. + */ + @java.lang.Override + public int getCurationTypeValue() { + return curationType_; + } + + /** + * + * + *
    +   * Required. The curation type for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curationType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationType getCurationType() { + com.google.cloud.apihub.v1.CurationType result = + com.google.cloud.apihub.v1.CurationType.forNumber(curationType_); + return result == null ? com.google.cloud.apihub.v1.CurationType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (curationType_ + != com.google.cloud.apihub.v1.CurationType.CURATION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, curationType_); + } + if (curationConfigCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (curationType_ + != com.google.cloud.apihub.v1.CurationType.CURATION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, curationType_); + } + if (curationConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_); + } + 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.apihub.v1.CurationConfig)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.CurationConfig other = + (com.google.cloud.apihub.v1.CurationConfig) obj; + + if (curationType_ != other.curationType_) return false; + if (!getCurationConfigCase().equals(other.getCurationConfigCase())) return false; + switch (curationConfigCase_) { + case 2: + if (!getCustomCuration().equals(other.getCustomCuration())) 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) + CURATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + curationType_; + switch (curationConfigCase_) { + case 2: + hash = (37 * hash) + CUSTOM_CURATION_FIELD_NUMBER; + hash = (53 * hash) + getCustomCuration().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig 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.apihub.v1.CurationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom( + 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.apihub.v1.CurationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom( + java.io.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.apihub.v1.CurationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseDelimitedFrom( + java.io.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.apihub.v1.CurationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.CurationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.CurationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The curation information for this plugin instance.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.CurationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.CurationConfig) + com.google.cloud.apihub.v1.CurationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.CurationConfig.class, + com.google.cloud.apihub.v1.CurationConfig.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.CurationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (customCurationBuilder_ != null) { + customCurationBuilder_.clear(); + } + curationType_ = 0; + curationConfigCase_ = 0; + curationConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_CurationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.CurationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig build() { + com.google.cloud.apihub.v1.CurationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig buildPartial() { + com.google.cloud.apihub.v1.CurationConfig result = + new com.google.cloud.apihub.v1.CurationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.CurationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.curationType_ = curationType_; + } + } + + private void buildPartialOneofs(com.google.cloud.apihub.v1.CurationConfig result) { + result.curationConfigCase_ = curationConfigCase_; + result.curationConfig_ = this.curationConfig_; + if (curationConfigCase_ == 2 && customCurationBuilder_ != null) { + result.curationConfig_ = customCurationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.CurationConfig) { + return mergeFrom((com.google.cloud.apihub.v1.CurationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.CurationConfig other) { + if (other == com.google.cloud.apihub.v1.CurationConfig.getDefaultInstance()) return this; + if (other.curationType_ != 0) { + setCurationTypeValue(other.getCurationTypeValue()); + } + switch (other.getCurationConfigCase()) { + case CUSTOM_CURATION: + { + mergeCustomCuration(other.getCustomCuration()); + break; + } + case CURATIONCONFIG_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 8: + { + curationType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 8 + case 18: + { + input.readMessage(getCustomCurationFieldBuilder().getBuilder(), extensionRegistry); + curationConfigCase_ = 2; + 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 curationConfigCase_ = 0; + private java.lang.Object curationConfig_; + + public CurationConfigCase getCurationConfigCase() { + return CurationConfigCase.forNumber(curationConfigCase_); + } + + public Builder clearCurationConfig() { + curationConfigCase_ = 0; + curationConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.CurationConfig.CustomCuration, + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder, + com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder> + customCurationBuilder_; + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customCuration field is set. + */ + @java.lang.Override + public boolean hasCustomCuration() { + return curationConfigCase_ == 2; + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customCuration. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration getCustomCuration() { + if (customCurationBuilder_ == null) { + if (curationConfigCase_ == 2) { + return (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_; + } + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } else { + if (curationConfigCase_ == 2) { + return customCurationBuilder_.getMessage(); + } + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomCuration( + com.google.cloud.apihub.v1.CurationConfig.CustomCuration value) { + if (customCurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + curationConfig_ = value; + onChanged(); + } else { + customCurationBuilder_.setMessage(value); + } + curationConfigCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomCuration( + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder builderForValue) { + if (customCurationBuilder_ == null) { + curationConfig_ = builderForValue.build(); + onChanged(); + } else { + customCurationBuilder_.setMessage(builderForValue.build()); + } + curationConfigCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCustomCuration( + com.google.cloud.apihub.v1.CurationConfig.CustomCuration value) { + if (customCurationBuilder_ == null) { + if (curationConfigCase_ == 2 + && curationConfig_ + != com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance()) { + curationConfig_ = + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.newBuilder( + (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + curationConfig_ = value; + } + onChanged(); + } else { + if (curationConfigCase_ == 2) { + customCurationBuilder_.mergeFrom(value); + } else { + customCurationBuilder_.setMessage(value); + } + } + curationConfigCase_ = 2; + return this; + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomCuration() { + if (customCurationBuilder_ == null) { + if (curationConfigCase_ == 2) { + curationConfigCase_ = 0; + curationConfig_ = null; + onChanged(); + } + } else { + if (curationConfigCase_ == 2) { + curationConfigCase_ = 0; + curationConfig_ = null; + } + customCurationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder + getCustomCurationBuilder() { + return getCustomCurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder + getCustomCurationOrBuilder() { + if ((curationConfigCase_ == 2) && (customCurationBuilder_ != null)) { + return customCurationBuilder_.getMessageOrBuilder(); + } else { + if (curationConfigCase_ == 2) { + return (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_; + } + return com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Optional. Custom curation information for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.CurationConfig.CustomCuration, + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder, + com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder> + getCustomCurationFieldBuilder() { + if (customCurationBuilder_ == null) { + if (!(curationConfigCase_ == 2)) { + curationConfig_ = + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.getDefaultInstance(); + } + customCurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.CurationConfig.CustomCuration, + com.google.cloud.apihub.v1.CurationConfig.CustomCuration.Builder, + com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder>( + (com.google.cloud.apihub.v1.CurationConfig.CustomCuration) curationConfig_, + getParentForChildren(), + isClean()); + curationConfig_ = null; + } + curationConfigCase_ = 2; + onChanged(); + return customCurationBuilder_; + } + + private int curationType_ = 0; + + /** + * + * + *
    +     * Required. The curation type for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for curationType. + */ + @java.lang.Override + public int getCurationTypeValue() { + return curationType_; + } + + /** + * + * + *
    +     * Required. The curation type for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for curationType to set. + * @return This builder for chaining. + */ + public Builder setCurationTypeValue(int value) { + curationType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The curation type for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curationType. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.CurationType getCurationType() { + com.google.cloud.apihub.v1.CurationType result = + com.google.cloud.apihub.v1.CurationType.forNumber(curationType_); + return result == null ? com.google.cloud.apihub.v1.CurationType.UNRECOGNIZED : result; + } + + /** + * + * + *
    +     * Required. The curation type for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The curationType to set. + * @return This builder for chaining. + */ + public Builder setCurationType(com.google.cloud.apihub.v1.CurationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + curationType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The curation type for this plugin instance.
    +     * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCurationType() { + bitField0_ = (bitField0_ & ~0x00000002); + curationType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.CurationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.CurationConfig) + private static final com.google.cloud.apihub.v1.CurationConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.CurationConfig(); + } + + public static com.google.cloud.apihub.v1.CurationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CurationConfig 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.apihub.v1.CurationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfigOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfigOrBuilder.java new file mode 100644 index 000000000000..10d69390b97f --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationConfigOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CurationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.CurationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customCuration field is set. + */ + boolean hasCustomCuration(); + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customCuration. + */ + com.google.cloud.apihub.v1.CurationConfig.CustomCuration getCustomCuration(); + + /** + * + * + *
    +   * Optional. Custom curation information for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.CurationConfig.CustomCurationOrBuilder getCustomCurationOrBuilder(); + + /** + * + * + *
    +   * Required. The curation type for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for curationType. + */ + int getCurationTypeValue(); + + /** + * + * + *
    +   * Required. The curation type for this plugin instance.
    +   * 
    + * + * + * .google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The curationType. + */ + com.google.cloud.apihub.v1.CurationType getCurationType(); + + com.google.cloud.apihub.v1.CurationConfig.CurationConfigCase getCurationConfigCase(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationName.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationName.java new file mode 100644 index 000000000000..32910f5fc0a9 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.apihub.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 CurationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CURATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/curations/{curation}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String curation; + + @Deprecated + protected CurationName() { + project = null; + location = null; + curation = null; + } + + private CurationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + curation = Preconditions.checkNotNull(builder.getCuration()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCuration() { + return curation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CurationName of(String project, String location, String curation) { + return newBuilder().setProject(project).setLocation(location).setCuration(curation).build(); + } + + public static String format(String project, String location, String curation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCuration(curation) + .build() + .toString(); + } + + public static CurationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CURATION.validatedMatch( + formattedString, "CurationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("curation")); + } + + 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 (CurationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CURATION.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 (curation != null) { + fieldMapBuilder.put("curation", curation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CURATION.instantiate( + "project", project, "location", location, "curation", curation); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CurationName that = ((CurationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.curation, that.curation); + } + 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(curation); + return h; + } + + /** Builder for projects/{project}/locations/{location}/curations/{curation}. */ + public static class Builder { + private String project; + private String location; + private String curation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCuration() { + return curation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCuration(String curation) { + this.curation = curation; + return this; + } + + private Builder(CurationName curationName) { + this.project = curationName.project; + this.location = curationName.location; + this.curation = curationName.curation; + } + + public CurationName build() { + return new CurationName(this); + } + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationOrBuilder.java new file mode 100644 index 000000000000..de0eca32b977 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationOrBuilder.java @@ -0,0 +1,400 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface CurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.Curation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Identifier. The name of the curation.
    +   *
    +   * Format:
    +   * `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Identifier. The name of the curation.
    +   *
    +   * Format:
    +   * `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. The display name of the curation.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
    +   * Required. The display name of the curation.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Optional. The description of the curation.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
    +   * Optional. The description of the curation.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endpoint field is set. + */ + boolean hasEndpoint(); + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endpoint. + */ + com.google.cloud.apihub.v1.Endpoint getEndpoint(); + + /** + * + * + *
    +   * Required. The endpoint to be triggered for curation.
    +   * 
    + * + * .google.cloud.apihub.v1.Endpoint endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.EndpointOrBuilder getEndpointOrBuilder(); + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPluginInstanceActionsList(); + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.Curation.PluginInstanceActionID getPluginInstanceActions(int index); + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPluginInstanceActionsCount(); + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPluginInstanceActionsOrBuilderList(); + + /** + * + * + *
    +   * Output only. The plugin instances and associated actions that are using the
    +   * curation. Note: A particular curation could be used by multiple plugin
    +   * instances or multiple actions in a plugin instance.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.Curation.PluginInstanceActionID plugin_instance_actions = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.Curation.PluginInstanceActionIDOrBuilder + getPluginInstanceActionsOrBuilder(int index); + + /** + * + * + *
    +   * Output only. The last execution state of the curation.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionState. + */ + int getLastExecutionStateValue(); + + /** + * + * + *
    +   * Output only. The last execution state of the curation.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.LastExecutionState last_execution_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionState. + */ + com.google.cloud.apihub.v1.Curation.LastExecutionState getLastExecutionState(); + + /** + * + * + *
    +   * Output only. The error code of the last execution of the curation. The
    +   * error code is populated only when the last execution state is failed.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastExecutionErrorCode. + */ + int getLastExecutionErrorCodeValue(); + + /** + * + * + *
    +   * Output only. The error code of the last execution of the curation. The
    +   * error code is populated only when the last execution state is failed.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Curation.ErrorCode last_execution_error_code = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorCode. + */ + com.google.cloud.apihub.v1.Curation.ErrorCode getLastExecutionErrorCode(); + + /** + * + * + *
    +   * Output only. Error message describing the failure, if any, during the last
    +   * execution of the curation.
    +   * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastExecutionErrorMessage. + */ + java.lang.String getLastExecutionErrorMessage(); + + /** + * + * + *
    +   * Output only. Error message describing the failure, if any, during the last
    +   * execution of the curation.
    +   * 
    + * + * string last_execution_error_message = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for lastExecutionErrorMessage. + */ + com.google.protobuf.ByteString getLastExecutionErrorMessageBytes(); + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
    +   * Output only. The time at which the curation was created.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
    +   * Output only. The time at which the curation was last updated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationType.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationType.java new file mode 100644 index 000000000000..89bce93c1887 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/CurationType.java @@ -0,0 +1,179 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * Enum for the curation type.
    + * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.CurationType} + */ +public enum CurationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * Default unspecified curation type.
    +   * 
    + * + * CURATION_TYPE_UNSPECIFIED = 0; + */ + CURATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +   * Default curation for API metadata will be used.
    +   * 
    + * + * DEFAULT_CURATION_FOR_API_METADATA = 1; + */ + DEFAULT_CURATION_FOR_API_METADATA(1), + /** + * + * + *
    +   * Custom curation for API metadata will be used.
    +   * 
    + * + * CUSTOM_CURATION_FOR_API_METADATA = 2; + */ + CUSTOM_CURATION_FOR_API_METADATA(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * Default unspecified curation type.
    +   * 
    + * + * CURATION_TYPE_UNSPECIFIED = 0; + */ + public static final int CURATION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +   * Default curation for API metadata will be used.
    +   * 
    + * + * DEFAULT_CURATION_FOR_API_METADATA = 1; + */ + public static final int DEFAULT_CURATION_FOR_API_METADATA_VALUE = 1; + + /** + * + * + *
    +   * Custom curation for API metadata will be used.
    +   * 
    + * + * CUSTOM_CURATION_FOR_API_METADATA = 2; + */ + public static final int CUSTOM_CURATION_FOR_API_METADATA_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CurationType 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 CurationType forNumber(int value) { + switch (value) { + case 0: + return CURATION_TYPE_UNSPECIFIED; + case 1: + return DEFAULT_CURATION_FOR_API_METADATA; + case 2: + return CUSTOM_CURATION_FOR_API_METADATA; + 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 CurationType findValueByNumber(int number) { + return CurationType.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.apihub.v1.PluginServiceProto.getDescriptor().getEnumTypes().get(2); + } + + private static final CurationType[] VALUES = values(); + + public static CurationType 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 CurationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.apihub.v1.CurationType) +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequest.java new file mode 100644 index 000000000000..6702f8e1586c --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/provisioning_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The
    + * [DeleteApiHubInstance][google.cloud.apihub.v1.Provisioning.DeleteApiHubInstance]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteApiHubInstanceRequest} + */ +public final class DeleteApiHubInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeleteApiHubInstanceRequest) + DeleteApiHubInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteApiHubInstanceRequest.newBuilder() to construct. + private DeleteApiHubInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteApiHubInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteApiHubInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ProvisioningServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiHubInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ProvisioningServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiHubInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.class, + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the Api Hub instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the Api Hub instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +   * 
    + * + * + * 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.apihub.v1.DeleteApiHubInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest other = + (com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest) 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.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest 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.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + 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.apihub.v1.DeleteApiHubInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + java.io.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.apihub.v1.DeleteApiHubInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseDelimitedFrom( + java.io.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.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeleteApiHubInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The
    +   * [DeleteApiHubInstance][google.cloud.apihub.v1.Provisioning.DeleteApiHubInstance]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteApiHubInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeleteApiHubInstanceRequest) + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ProvisioningServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiHubInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ProvisioningServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiHubInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.class, + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.ProvisioningServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiHubInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest build() { + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest buildPartial() { + com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest result = + new com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeleteApiHubInstanceRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest other) { + if (other == com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the Api Hub instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the Api Hub instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the Api Hub instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the Api Hub instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the Api Hub instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.DeleteApiHubInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeleteApiHubInstanceRequest) + private static final com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest(); + } + + public static com.google.cloud.apihub.v1.DeleteApiHubInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiHubInstanceRequest 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.apihub.v1.DeleteApiHubInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..c45d93db5404 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiHubInstanceRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/provisioning_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeleteApiHubInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeleteApiHubInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the Api Hub instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the Api Hub instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
    +   * 
    + * + * + * 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-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequest.java new file mode 100644 index 000000000000..5cf0f54417d2 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/apihub_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [DeleteApiOperation][google.cloud.apihub.v1.ApiHub.DeleteApiOperation]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteApiOperationRequest} + */ +public final class DeleteApiOperationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeleteApiOperationRequest) + DeleteApiOperationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteApiOperationRequest.newBuilder() to construct. + private DeleteApiOperationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteApiOperationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteApiOperationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteApiOperationRequest.class, + com.google.cloud.apihub.v1.DeleteApiOperationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the operation resource to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the operation resource to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +   * 
    + * + * + * 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.apihub.v1.DeleteApiOperationRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeleteApiOperationRequest other = + (com.google.cloud.apihub.v1.DeleteApiOperationRequest) 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.apihub.v1.DeleteApiOperationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest 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.apihub.v1.DeleteApiOperationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseFrom( + 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.apihub.v1.DeleteApiOperationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseFrom( + java.io.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.apihub.v1.DeleteApiOperationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseDelimitedFrom( + java.io.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.apihub.v1.DeleteApiOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeleteApiOperationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [DeleteApiOperation][google.cloud.apihub.v1.ApiHub.DeleteApiOperation]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteApiOperationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeleteApiOperationRequest) + com.google.cloud.apihub.v1.DeleteApiOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteApiOperationRequest.class, + com.google.cloud.apihub.v1.DeleteApiOperationRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeleteApiOperationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.ApiHubServiceProto + .internal_static_google_cloud_apihub_v1_DeleteApiOperationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiOperationRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeleteApiOperationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiOperationRequest build() { + com.google.cloud.apihub.v1.DeleteApiOperationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteApiOperationRequest buildPartial() { + com.google.cloud.apihub.v1.DeleteApiOperationRequest result = + new com.google.cloud.apihub.v1.DeleteApiOperationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeleteApiOperationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeleteApiOperationRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DeleteApiOperationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeleteApiOperationRequest other) { + if (other == com.google.cloud.apihub.v1.DeleteApiOperationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the operation resource to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the operation resource to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the operation resource to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the operation resource to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the operation resource to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.DeleteApiOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeleteApiOperationRequest) + private static final com.google.cloud.apihub.v1.DeleteApiOperationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeleteApiOperationRequest(); + } + + public static com.google.cloud.apihub.v1.DeleteApiOperationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApiOperationRequest 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.apihub.v1.DeleteApiOperationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequestOrBuilder.java new file mode 100644 index 000000000000..92f8940e9908 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteApiOperationRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/apihub_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeleteApiOperationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeleteApiOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the operation resource to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the operation resource to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
    +   * 
    + * + * + * 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-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequest.java new file mode 100644 index 000000000000..b616c4f80ad5 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [DeleteCuration][ApiHub.DeleteCuration] method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteCurationRequest} + */ +public final class DeleteCurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeleteCurationRequest) + DeleteCurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteCurationRequest.newBuilder() to construct. + private DeleteCurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCurationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_DeleteCurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteCurationRequest.class, + com.google.cloud.apihub.v1.DeleteCurationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the curation resource to delete.
    +   * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the curation resource to delete.
    +   * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * + * 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.apihub.v1.DeleteCurationRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeleteCurationRequest other = + (com.google.cloud.apihub.v1.DeleteCurationRequest) 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.apihub.v1.DeleteCurationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest 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.apihub.v1.DeleteCurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseFrom( + 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.apihub.v1.DeleteCurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseFrom( + java.io.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.apihub.v1.DeleteCurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseDelimitedFrom( + java.io.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.apihub.v1.DeleteCurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeleteCurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [DeleteCuration][ApiHub.DeleteCuration] method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeleteCurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeleteCurationRequest) + com.google.cloud.apihub.v1.DeleteCurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_DeleteCurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeleteCurationRequest.class, + com.google.cloud.apihub.v1.DeleteCurationRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeleteCurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CurateServiceProto + .internal_static_google_cloud_apihub_v1_DeleteCurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteCurationRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeleteCurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteCurationRequest build() { + com.google.cloud.apihub.v1.DeleteCurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeleteCurationRequest buildPartial() { + com.google.cloud.apihub.v1.DeleteCurationRequest result = + new com.google.cloud.apihub.v1.DeleteCurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeleteCurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeleteCurationRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DeleteCurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeleteCurationRequest other) { + if (other == com.google.cloud.apihub.v1.DeleteCurationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the curation resource to delete.
    +     * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the curation resource to delete.
    +     * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the curation resource to delete.
    +     * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the curation resource to delete.
    +     * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the curation resource to delete.
    +     * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.DeleteCurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeleteCurationRequest) + private static final com.google.cloud.apihub.v1.DeleteCurationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeleteCurationRequest(); + } + + public static com.google.cloud.apihub.v1.DeleteCurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCurationRequest 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.apihub.v1.DeleteCurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequestOrBuilder.java new file mode 100644 index 000000000000..7adab49f3993 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeleteCurationRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/curate_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeleteCurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeleteCurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the curation resource to delete.
    +   * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the curation resource to delete.
    +   * Format: `projects/{project}/locations/{location}/curations/{curation}`
    +   * 
    + * + * + * 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-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequest.java new file mode 100644 index 000000000000..fd72cc62741a --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The
    + * [DeletePluginInstance][google.cloud.apihub.v1.ApiHubPlugin.DeletePluginInstance]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeletePluginInstanceRequest} + */ +public final class DeletePluginInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeletePluginInstanceRequest) + DeletePluginInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePluginInstanceRequest.newBuilder() to construct. + private DeletePluginInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePluginInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePluginInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeletePluginInstanceRequest.class, + com.google.cloud.apihub.v1.DeletePluginInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the plugin instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the plugin instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * 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.apihub.v1.DeletePluginInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeletePluginInstanceRequest other = + (com.google.cloud.apihub.v1.DeletePluginInstanceRequest) 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.apihub.v1.DeletePluginInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest 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.apihub.v1.DeletePluginInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseFrom( + 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.apihub.v1.DeletePluginInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseFrom( + java.io.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.apihub.v1.DeletePluginInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseDelimitedFrom( + java.io.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.apihub.v1.DeletePluginInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeletePluginInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The
    +   * [DeletePluginInstance][google.cloud.apihub.v1.ApiHubPlugin.DeletePluginInstance]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeletePluginInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeletePluginInstanceRequest) + com.google.cloud.apihub.v1.DeletePluginInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeletePluginInstanceRequest.class, + com.google.cloud.apihub.v1.DeletePluginInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeletePluginInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeletePluginInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginInstanceRequest build() { + com.google.cloud.apihub.v1.DeletePluginInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginInstanceRequest buildPartial() { + com.google.cloud.apihub.v1.DeletePluginInstanceRequest result = + new com.google.cloud.apihub.v1.DeletePluginInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeletePluginInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeletePluginInstanceRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DeletePluginInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeletePluginInstanceRequest other) { + if (other == com.google.cloud.apihub.v1.DeletePluginInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the plugin instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to delete.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.DeletePluginInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeletePluginInstanceRequest) + private static final com.google.cloud.apihub.v1.DeletePluginInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeletePluginInstanceRequest(); + } + + public static com.google.cloud.apihub.v1.DeletePluginInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePluginInstanceRequest 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.apihub.v1.DeletePluginInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..dc8e7419fc42 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginInstanceRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeletePluginInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeletePluginInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the plugin instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the plugin instance to delete.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.
    +   * 
    + * + * + * 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-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequest.java new file mode 100644 index 000000000000..711c9dcf5eef --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The [DeletePlugin][ApiHub.DeletePlugin] method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeletePluginRequest} + */ +public final class DeletePluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeletePluginRequest) + DeletePluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePluginRequest.newBuilder() to construct. + private DeletePluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePluginRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeletePluginRequest.class, + com.google.cloud.apihub.v1.DeletePluginRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the Plugin resource to delete.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the Plugin resource to delete.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * 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.apihub.v1.DeletePluginRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeletePluginRequest other = + (com.google.cloud.apihub.v1.DeletePluginRequest) 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.apihub.v1.DeletePluginRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest 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.apihub.v1.DeletePluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseFrom( + 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.apihub.v1.DeletePluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseFrom( + java.io.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.apihub.v1.DeletePluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseDelimitedFrom( + java.io.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.apihub.v1.DeletePluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeletePluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The [DeletePlugin][ApiHub.DeletePlugin] method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeletePluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeletePluginRequest) + com.google.cloud.apihub.v1.DeletePluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeletePluginRequest.class, + com.google.cloud.apihub.v1.DeletePluginRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeletePluginRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DeletePluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginRequest getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeletePluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginRequest build() { + com.google.cloud.apihub.v1.DeletePluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeletePluginRequest buildPartial() { + com.google.cloud.apihub.v1.DeletePluginRequest result = + new com.google.cloud.apihub.v1.DeletePluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeletePluginRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeletePluginRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DeletePluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeletePluginRequest other) { + if (other == com.google.cloud.apihub.v1.DeletePluginRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the Plugin resource to delete.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the Plugin resource to delete.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the Plugin resource to delete.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the Plugin resource to delete.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the Plugin resource to delete.
    +     * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.apihub.v1.DeletePluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeletePluginRequest) + private static final com.google.cloud.apihub.v1.DeletePluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeletePluginRequest(); + } + + public static com.google.cloud.apihub.v1.DeletePluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePluginRequest 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.apihub.v1.DeletePluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequestOrBuilder.java new file mode 100644 index 000000000000..4995e4993d49 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeletePluginRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeletePluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeletePluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the Plugin resource to delete.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the Plugin resource to delete.
    +   * Format: `projects/{project}/locations/{location}/plugins/{plugin}`
    +   * 
    + * + * + * 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-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Dependency.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Dependency.java index 00ab317e3c96..00c0eb0f74f4 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Dependency.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Dependency.java @@ -25,8 +25,8 @@ *
      * A dependency resource defined in the API hub describes a dependency directed
      * from a consumer to a supplier entity. A dependency can be defined between two
    - * [Operations][google.cloud.apihub.v1.Operation] or between
    - * an [Operation][google.cloud.apihub.v1.Operation] and [External
    + * [Operations][google.cloud.apihub.v1.ApiOperation] or between
    + * an [Operation][google.cloud.apihub.v1.ApiOperation] and [External
      * API][google.cloud.apihub.v1.ExternalApi].
      * 
    * @@ -1280,8 +1280,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * A dependency resource defined in the API hub describes a dependency directed
        * from a consumer to a supplier entity. A dependency can be defined between two
    -   * [Operations][google.cloud.apihub.v1.Operation] or between
    -   * an [Operation][google.cloud.apihub.v1.Operation] and [External
    +   * [Operations][google.cloud.apihub.v1.ApiOperation] or between
    +   * an [Operation][google.cloud.apihub.v1.ApiOperation] and [External
        * API][google.cloud.apihub.v1.ExternalApi].
        * 
    * diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Deployment.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Deployment.java index 83342a35f961..26a71940bdc1 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Deployment.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/Deployment.java @@ -49,6 +49,9 @@ private Deployment() { resourceUri_ = ""; endpoints_ = com.google.protobuf.LazyStringArrayList.emptyList(); apiVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + sourceMetadata_ = java.util.Collections.emptyList(); + sourceProject_ = ""; + sourceEnvironment_ = ""; } @java.lang.Override @@ -398,9 +401,12 @@ public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getDeploymentTypeOrBu * * *
    -   * Required. A URI to the runtime resource. This URI can be used to manage the
    -   * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -   * then this field will contain the URI to the management UI of the proxy.
    +   * Required. The resource URI identifies the deployment within its gateway.
    +   * For Apigee gateways, its recommended to use the format:
    +   * organizations/{org}/environments/{env}/apis/{api}.
    +   * For ex: if a proxy with name `orders` is deployed in `staging`
    +   * environment of `cymbal` organization, the resource URI would be:
    +   * `organizations/cymbal/environments/staging/apis/orders`.
        * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -424,9 +430,12 @@ public java.lang.String getResourceUri() { * * *
    -   * Required. A URI to the runtime resource. This URI can be used to manage the
    -   * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -   * then this field will contain the URI to the management UI of the proxy.
    +   * Required. The resource URI identifies the deployment within its gateway.
    +   * For Apigee gateways, its recommended to use the format:
    +   * organizations/{org}/environments/{env}/apis/{api}.
    +   * For ex: if a proxy with name `orders` is deployed in `staging`
    +   * environment of `cymbal` organization, the resource URI would be:
    +   * `organizations/cymbal/environments/staging/apis/orders`.
        * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -994,6 +1003,366 @@ public com.google.cloud.apihub.v1.AttributeValues getAttributesOrThrow(java.lang return map.get(key); } + public static final int SOURCE_METADATA_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List sourceMetadata_; + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSourceMetadataList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSourceMetadataOrBuilderList() { + return sourceMetadata_; + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSourceMetadataCount() { + return sourceMetadata_.size(); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + return sourceMetadata_.get(index); + } + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index) { + return sourceMetadata_.get(index); + } + + public static final int MANAGEMENT_URL_FIELD_NUMBER = 15; + private com.google.cloud.apihub.v1.AttributeValues managementUrl_; + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the managementUrl field is set. + */ + @java.lang.Override + public boolean hasManagementUrl() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The managementUrl. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues getManagementUrl() { + return managementUrl_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : managementUrl_; + } + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getManagementUrlOrBuilder() { + return managementUrl_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : managementUrl_; + } + + public static final int SOURCE_URI_FIELD_NUMBER = 16; + private com.google.cloud.apihub.v1.AttributeValues sourceUri_; + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sourceUri field is set. + */ + @java.lang.Override + public boolean hasSourceUri() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sourceUri. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValues getSourceUri() { + return sourceUri_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : sourceUri_; + } + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getSourceUriOrBuilder() { + return sourceUri_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : sourceUri_; + } + + public static final int SOURCE_PROJECT_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceProject_ = ""; + + /** + * + * + *
    +   * Optional. The project to which the deployment belongs.
    +   * For GCP gateways, this will refer to the project identifier.
    +   * For others like Edge/OPDK, this will refer to the org identifier.
    +   * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceProject. + */ + @java.lang.Override + public java.lang.String getSourceProject() { + java.lang.Object ref = sourceProject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceProject_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The project to which the deployment belongs.
    +   * For GCP gateways, this will refer to the project identifier.
    +   * For others like Edge/OPDK, this will refer to the org identifier.
    +   * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceProject. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceProjectBytes() { + java.lang.Object ref = sourceProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_ENVIRONMENT_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceEnvironment_ = ""; + + /** + * + * + *
    +   * Optional. The environment at source for the deployment.
    +   * For example: prod, dev, staging, etc.
    +   * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceEnvironment. + */ + @java.lang.Override + public java.lang.String getSourceEnvironment() { + java.lang.Object ref = sourceEnvironment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceEnvironment_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The environment at source for the deployment.
    +   * For example: prod, dev, staging, etc.
    +   * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceEnvironment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceEnvironmentBytes() { + java.lang.Object ref = sourceEnvironment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceEnvironment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1046,6 +1415,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 13); + for (int i = 0; i < sourceMetadata_.size(); i++) { + output.writeMessage(14, sourceMetadata_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(15, getManagementUrl()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(16, getSourceUri()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceProject_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, sourceProject_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceEnvironment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, sourceEnvironment_); + } getUnknownFields().writeTo(output); } @@ -1112,6 +1496,21 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, attributes__); } + for (int i = 0; i < sourceMetadata_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, sourceMetadata_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getManagementUrl()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSourceUri()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceProject_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, sourceProject_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceEnvironment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, sourceEnvironment_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1158,6 +1557,17 @@ public boolean equals(final java.lang.Object obj) { if (!getEnvironment().equals(other.getEnvironment())) return false; } if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (!getSourceMetadataList().equals(other.getSourceMetadataList())) return false; + if (hasManagementUrl() != other.hasManagementUrl()) return false; + if (hasManagementUrl()) { + if (!getManagementUrl().equals(other.getManagementUrl())) return false; + } + if (hasSourceUri() != other.hasSourceUri()) return false; + if (hasSourceUri()) { + if (!getSourceUri().equals(other.getSourceUri())) return false; + } + if (!getSourceProject().equals(other.getSourceProject())) return false; + if (!getSourceEnvironment().equals(other.getSourceEnvironment())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1213,6 +1623,22 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } + if (getSourceMetadataCount() > 0) { + hash = (37 * hash) + SOURCE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getSourceMetadataList().hashCode(); + } + if (hasManagementUrl()) { + hash = (37 * hash) + MANAGEMENT_URL_FIELD_NUMBER; + hash = (53 * hash) + getManagementUrl().hashCode(); + } + if (hasSourceUri()) { + hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSourceUri().hashCode(); + } + hash = (37 * hash) + SOURCE_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getSourceProject().hashCode(); + hash = (37 * hash) + SOURCE_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getSourceEnvironment().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1384,6 +1810,9 @@ private void maybeForceBuilderInitialization() { getUpdateTimeFieldBuilder(); getSloFieldBuilder(); getEnvironmentFieldBuilder(); + getSourceMetadataFieldBuilder(); + getManagementUrlFieldBuilder(); + getSourceUriFieldBuilder(); } } @@ -1428,6 +1857,25 @@ public Builder clear() { environmentBuilder_ = null; } internalGetMutableAttributes().clear(); + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + } else { + sourceMetadata_ = null; + sourceMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + managementUrl_ = null; + if (managementUrlBuilder_ != null) { + managementUrlBuilder_.dispose(); + managementUrlBuilder_ = null; + } + sourceUri_ = null; + if (sourceUriBuilder_ != null) { + sourceUriBuilder_.dispose(); + sourceUriBuilder_ = null; + } + sourceProject_ = ""; + sourceEnvironment_ = ""; return this; } @@ -1455,6 +1903,7 @@ public com.google.cloud.apihub.v1.Deployment build() { public com.google.cloud.apihub.v1.Deployment buildPartial() { com.google.cloud.apihub.v1.Deployment result = new com.google.cloud.apihub.v1.Deployment(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1462,8 +1911,20 @@ public com.google.cloud.apihub.v1.Deployment buildPartial() { return result; } - private void buildPartial0(com.google.cloud.apihub.v1.Deployment result) { - int from_bitField0_ = bitField0_; + private void buildPartialRepeatedFields(com.google.cloud.apihub.v1.Deployment result) { + if (sourceMetadataBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + sourceMetadata_ = java.util.Collections.unmodifiableList(sourceMetadata_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.sourceMetadata_ = sourceMetadata_; + } else { + result.sourceMetadata_ = sourceMetadataBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.apihub.v1.Deployment result) { + int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } @@ -1516,6 +1977,21 @@ private void buildPartial0(com.google.cloud.apihub.v1.Deployment result) { result.attributes_ = internalGetAttributes().build(AttributesDefaultEntryHolder.defaultEntry); } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.managementUrl_ = + managementUrlBuilder_ == null ? managementUrl_ : managementUrlBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.sourceUri_ = sourceUriBuilder_ == null ? sourceUri_ : sourceUriBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.sourceProject_ = sourceProject_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.sourceEnvironment_ = sourceEnvironment_; + } result.bitField0_ |= to_bitField0_; } @@ -1624,6 +2100,49 @@ public Builder mergeFrom(com.google.cloud.apihub.v1.Deployment other) { } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); bitField0_ |= 0x00001000; + if (sourceMetadataBuilder_ == null) { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadata_.isEmpty()) { + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureSourceMetadataIsMutable(); + sourceMetadata_.addAll(other.sourceMetadata_); + } + onChanged(); + } + } else { + if (!other.sourceMetadata_.isEmpty()) { + if (sourceMetadataBuilder_.isEmpty()) { + sourceMetadataBuilder_.dispose(); + sourceMetadataBuilder_ = null; + sourceMetadata_ = other.sourceMetadata_; + bitField0_ = (bitField0_ & ~0x00002000); + sourceMetadataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSourceMetadataFieldBuilder() + : null; + } else { + sourceMetadataBuilder_.addAllMessages(other.sourceMetadata_); + } + } + } + if (other.hasManagementUrl()) { + mergeManagementUrl(other.getManagementUrl()); + } + if (other.hasSourceUri()) { + mergeSourceUri(other.getSourceUri()); + } + if (!other.getSourceProject().isEmpty()) { + sourceProject_ = other.sourceProject_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (!other.getSourceEnvironment().isEmpty()) { + sourceEnvironment_ = other.sourceEnvironment_; + bitField0_ |= 0x00020000; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1738,6 +2257,43 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 106 + case 114: + { + com.google.cloud.apihub.v1.SourceMetadata m = + input.readMessage( + com.google.cloud.apihub.v1.SourceMetadata.parser(), extensionRegistry); + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(m); + } else { + sourceMetadataBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + input.readMessage(getManagementUrlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + input.readMessage(getSourceUriFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + sourceProject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: + { + sourceEnvironment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2600,9 +3156,12 @@ public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getDeploymentTypeOrBu * * *
    -     * Required. A URI to the runtime resource. This URI can be used to manage the
    -     * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -     * then this field will contain the URI to the management UI of the proxy.
    +     * Required. The resource URI identifies the deployment within its gateway.
    +     * For Apigee gateways, its recommended to use the format:
    +     * organizations/{org}/environments/{env}/apis/{api}.
    +     * For ex: if a proxy with name `orders` is deployed in `staging`
    +     * environment of `cymbal` organization, the resource URI would be:
    +     * `organizations/cymbal/environments/staging/apis/orders`.
          * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -2625,9 +3184,12 @@ public java.lang.String getResourceUri() { * * *
    -     * Required. A URI to the runtime resource. This URI can be used to manage the
    -     * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -     * then this field will contain the URI to the management UI of the proxy.
    +     * Required. The resource URI identifies the deployment within its gateway.
    +     * For Apigee gateways, its recommended to use the format:
    +     * organizations/{org}/environments/{env}/apis/{api}.
    +     * For ex: if a proxy with name `orders` is deployed in `staging`
    +     * environment of `cymbal` organization, the resource URI would be:
    +     * `organizations/cymbal/environments/staging/apis/orders`.
          * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -2650,9 +3212,12 @@ public com.google.protobuf.ByteString getResourceUriBytes() { * * *
    -     * Required. A URI to the runtime resource. This URI can be used to manage the
    -     * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -     * then this field will contain the URI to the management UI of the proxy.
    +     * Required. The resource URI identifies the deployment within its gateway.
    +     * For Apigee gateways, its recommended to use the format:
    +     * organizations/{org}/environments/{env}/apis/{api}.
    +     * For ex: if a proxy with name `orders` is deployed in `staging`
    +     * environment of `cymbal` organization, the resource URI would be:
    +     * `organizations/cymbal/environments/staging/apis/orders`.
          * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -2674,9 +3239,12 @@ public Builder setResourceUri(java.lang.String value) { * * *
    -     * Required. A URI to the runtime resource. This URI can be used to manage the
    -     * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -     * then this field will contain the URI to the management UI of the proxy.
    +     * Required. The resource URI identifies the deployment within its gateway.
    +     * For Apigee gateways, its recommended to use the format:
    +     * organizations/{org}/environments/{env}/apis/{api}.
    +     * For ex: if a proxy with name `orders` is deployed in `staging`
    +     * environment of `cymbal` organization, the resource URI would be:
    +     * `organizations/cymbal/environments/staging/apis/orders`.
          * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -2694,9 +3262,12 @@ public Builder clearResourceUri() { * * *
    -     * Required. A URI to the runtime resource. This URI can be used to manage the
    -     * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -     * then this field will contain the URI to the management UI of the proxy.
    +     * Required. The resource URI identifies the deployment within its gateway.
    +     * For Apigee gateways, its recommended to use the format:
    +     * organizations/{org}/environments/{env}/apis/{api}.
    +     * For ex: if a proxy with name `orders` is deployed in `staging`
    +     * environment of `cymbal` organization, the resource URI would be:
    +     * `organizations/cymbal/environments/staging/apis/orders`.
          * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -4378,6 +4949,1212 @@ public com.google.cloud.apihub.v1.AttributeValues.Builder putAttributesBuilderIf return (com.google.cloud.apihub.v1.AttributeValues.Builder) entry; } + private java.util.List sourceMetadata_ = + java.util.Collections.emptyList(); + + private void ensureSourceMetadataIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + sourceMetadata_ = + new java.util.ArrayList(sourceMetadata_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + sourceMetadataBuilder_; + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSourceMetadataList() { + if (sourceMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } else { + return sourceMetadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSourceMetadataCount() { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.size(); + } else { + return sourceMetadataBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.set(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata(int index, com.google.cloud.apihub.v1.SourceMetadata value) { + if (sourceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, value); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSourceMetadata( + int index, com.google.cloud.apihub.v1.SourceMetadata.Builder builderForValue) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + sourceMetadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSourceMetadata( + java.lang.Iterable values) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceMetadata_); + onChanged(); + } else { + sourceMetadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSourceMetadata() { + if (sourceMetadataBuilder_ == null) { + sourceMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + sourceMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSourceMetadata(int index) { + if (sourceMetadataBuilder_ == null) { + ensureSourceMetadataIsMutable(); + sourceMetadata_.remove(index); + onChanged(); + } else { + sourceMetadataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder getSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder( + int index) { + if (sourceMetadataBuilder_ == null) { + return sourceMetadata_.get(index); + } else { + return sourceMetadataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataOrBuilderList() { + if (sourceMetadataBuilder_ != null) { + return sourceMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sourceMetadata_); + } + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder() { + return getSourceMetadataFieldBuilder() + .addBuilder(com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.apihub.v1.SourceMetadata.Builder addSourceMetadataBuilder(int index) { + return getSourceMetadataFieldBuilder() + .addBuilder(index, com.google.cloud.apihub.v1.SourceMetadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. The list of sources and metadata from the sources of the
    +     * deployment.
    +     * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSourceMetadataBuilderList() { + return getSourceMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder> + getSourceMetadataFieldBuilder() { + if (sourceMetadataBuilder_ == null) { + sourceMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.apihub.v1.SourceMetadata, + com.google.cloud.apihub.v1.SourceMetadata.Builder, + com.google.cloud.apihub.v1.SourceMetadataOrBuilder>( + sourceMetadata_, + ((bitField0_ & 0x00002000) != 0), + getParentForChildren(), + isClean()); + sourceMetadata_ = null; + } + return sourceMetadataBuilder_; + } + + private com.google.cloud.apihub.v1.AttributeValues managementUrl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + managementUrlBuilder_; + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the managementUrl field is set. + */ + public boolean hasManagementUrl() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The managementUrl. + */ + public com.google.cloud.apihub.v1.AttributeValues getManagementUrl() { + if (managementUrlBuilder_ == null) { + return managementUrl_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : managementUrl_; + } else { + return managementUrlBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setManagementUrl(com.google.cloud.apihub.v1.AttributeValues value) { + if (managementUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managementUrl_ = value; + } else { + managementUrlBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setManagementUrl( + com.google.cloud.apihub.v1.AttributeValues.Builder builderForValue) { + if (managementUrlBuilder_ == null) { + managementUrl_ = builderForValue.build(); + } else { + managementUrlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeManagementUrl(com.google.cloud.apihub.v1.AttributeValues value) { + if (managementUrlBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && managementUrl_ != null + && managementUrl_ != com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) { + getManagementUrlBuilder().mergeFrom(value); + } else { + managementUrl_ = value; + } + } else { + managementUrlBuilder_.mergeFrom(value); + } + if (managementUrl_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearManagementUrl() { + bitField0_ = (bitField0_ & ~0x00004000); + managementUrl_ = null; + if (managementUrlBuilder_ != null) { + managementUrlBuilder_.dispose(); + managementUrlBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValues.Builder getManagementUrlBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getManagementUrlFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getManagementUrlOrBuilder() { + if (managementUrlBuilder_ != null) { + return managementUrlBuilder_.getMessageOrBuilder(); + } else { + return managementUrl_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : managementUrl_; + } + } + + /** + * + * + *
    +     * Optional. The uri where users can navigate to for the management of the
    +     * deployment. This maps to the following system defined attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-management-url`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URL.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + getManagementUrlFieldBuilder() { + if (managementUrlBuilder_ == null) { + managementUrlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder>( + getManagementUrl(), getParentForChildren(), isClean()); + managementUrl_ = null; + } + return managementUrlBuilder_; + } + + private com.google.cloud.apihub.v1.AttributeValues sourceUri_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + sourceUriBuilder_; + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sourceUri field is set. + */ + public boolean hasSourceUri() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sourceUri. + */ + public com.google.cloud.apihub.v1.AttributeValues getSourceUri() { + if (sourceUriBuilder_ == null) { + return sourceUri_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : sourceUri_; + } else { + return sourceUriBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSourceUri(com.google.cloud.apihub.v1.AttributeValues value) { + if (sourceUriBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceUri_ = value; + } else { + sourceUriBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSourceUri( + com.google.cloud.apihub.v1.AttributeValues.Builder builderForValue) { + if (sourceUriBuilder_ == null) { + sourceUri_ = builderForValue.build(); + } else { + sourceUriBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSourceUri(com.google.cloud.apihub.v1.AttributeValues value) { + if (sourceUriBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && sourceUri_ != null + && sourceUri_ != com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance()) { + getSourceUriBuilder().mergeFrom(value); + } else { + sourceUri_ = value; + } + } else { + sourceUriBuilder_.mergeFrom(value); + } + if (sourceUri_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSourceUri() { + bitField0_ = (bitField0_ & ~0x00008000); + sourceUri_ = null; + if (sourceUriBuilder_ != null) { + sourceUriBuilder_.dispose(); + sourceUriBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValues.Builder getSourceUriBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getSourceUriFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.apihub.v1.AttributeValuesOrBuilder getSourceUriOrBuilder() { + if (sourceUriBuilder_ != null) { + return sourceUriBuilder_.getMessageOrBuilder(); + } else { + return sourceUri_ == null + ? com.google.cloud.apihub.v1.AttributeValues.getDefaultInstance() + : sourceUri_; + } + } + + /** + * + * + *
    +     * Optional. The uri where additional source specific information for this
    +     * deployment can be found. This maps to the following system defined
    +     * attribute:
    +     * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +     * The number of values for this attribute will be based on the
    +     * cardinality of the attribute. The same can be retrieved via GetAttribute
    +     * API. The value of the attribute should be a valid URI, and in case
    +     * of Cloud Storage URI, it should point to a Cloud Storage object,
    +     * not a directory.
    +     * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder> + getSourceUriFieldBuilder() { + if (sourceUriBuilder_ == null) { + sourceUriBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.AttributeValues, + com.google.cloud.apihub.v1.AttributeValues.Builder, + com.google.cloud.apihub.v1.AttributeValuesOrBuilder>( + getSourceUri(), getParentForChildren(), isClean()); + sourceUri_ = null; + } + return sourceUriBuilder_; + } + + private java.lang.Object sourceProject_ = ""; + + /** + * + * + *
    +     * Optional. The project to which the deployment belongs.
    +     * For GCP gateways, this will refer to the project identifier.
    +     * For others like Edge/OPDK, this will refer to the org identifier.
    +     * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceProject. + */ + public java.lang.String getSourceProject() { + java.lang.Object ref = sourceProject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceProject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The project to which the deployment belongs.
    +     * For GCP gateways, this will refer to the project identifier.
    +     * For others like Edge/OPDK, this will refer to the org identifier.
    +     * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceProject. + */ + public com.google.protobuf.ByteString getSourceProjectBytes() { + java.lang.Object ref = sourceProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The project to which the deployment belongs.
    +     * For GCP gateways, this will refer to the project identifier.
    +     * For others like Edge/OPDK, this will refer to the org identifier.
    +     * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sourceProject to set. + * @return This builder for chaining. + */ + public Builder setSourceProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceProject_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The project to which the deployment belongs.
    +     * For GCP gateways, this will refer to the project identifier.
    +     * For others like Edge/OPDK, this will refer to the org identifier.
    +     * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSourceProject() { + sourceProject_ = getDefaultInstance().getSourceProject(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The project to which the deployment belongs.
    +     * For GCP gateways, this will refer to the project identifier.
    +     * For others like Edge/OPDK, this will refer to the org identifier.
    +     * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sourceProject to set. + * @return This builder for chaining. + */ + public Builder setSourceProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceProject_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private java.lang.Object sourceEnvironment_ = ""; + + /** + * + * + *
    +     * Optional. The environment at source for the deployment.
    +     * For example: prod, dev, staging, etc.
    +     * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceEnvironment. + */ + public java.lang.String getSourceEnvironment() { + java.lang.Object ref = sourceEnvironment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceEnvironment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The environment at source for the deployment.
    +     * For example: prod, dev, staging, etc.
    +     * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceEnvironment. + */ + public com.google.protobuf.ByteString getSourceEnvironmentBytes() { + java.lang.Object ref = sourceEnvironment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceEnvironment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The environment at source for the deployment.
    +     * For example: prod, dev, staging, etc.
    +     * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sourceEnvironment to set. + * @return This builder for chaining. + */ + public Builder setSourceEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceEnvironment_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The environment at source for the deployment.
    +     * For example: prod, dev, staging, etc.
    +     * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSourceEnvironment() { + sourceEnvironment_ = getDefaultInstance().getSourceEnvironment(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The environment at source for the deployment.
    +     * For example: prod, dev, staging, etc.
    +     * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sourceEnvironment to set. + * @return This builder for chaining. + */ + public Builder setSourceEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceEnvironment_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadata.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadata.java new file mode 100644 index 000000000000..9b86ded77ea2 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadata.java @@ -0,0 +1,1607 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The metadata associated with a deployment.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeploymentMetadata} + */ +public final class DeploymentMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DeploymentMetadata) + DeploymentMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeploymentMetadata.newBuilder() to construct. + private DeploymentMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeploymentMetadata() { + originalId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeploymentMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_DeploymentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeploymentMetadata.class, + com.google.cloud.apihub.v1.DeploymentMetadata.Builder.class); + } + + private int bitField0_; + public static final int DEPLOYMENT_FIELD_NUMBER = 1; + private com.google.cloud.apihub.v1.Deployment deployment_; + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + @java.lang.Override + public com.google.cloud.apihub.v1.Deployment getDeployment() { + return deployment_ == null + ? com.google.cloud.apihub.v1.Deployment.getDefaultInstance() + : deployment_; + } + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + return deployment_ == null + ? com.google.cloud.apihub.v1.Deployment.getDefaultInstance() + : deployment_; + } + + public static final int ORIGINAL_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object originalId_ = ""; + + /** + * + * + *
    +   * Optional. The unique identifier of the deployment in the system where it
    +   * was originally created.
    +   * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + @java.lang.Override + public java.lang.String getOriginalId() { + java.lang.Object ref = originalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The unique identifier of the deployment in the system where it
    +   * was originally created.
    +   * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOriginalIdBytes() { + java.lang.Object ref = originalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORIGINAL_CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp originalCreateTime_; + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + @java.lang.Override + public boolean hasOriginalCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOriginalCreateTime() { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder() { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + + public static final int ORIGINAL_UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp originalUpdateTime_; + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + @java.lang.Override + public boolean hasOriginalUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOriginalUpdateTime() { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder() { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, originalId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getOriginalCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getOriginalUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, originalId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOriginalCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOriginalUpdateTime()); + } + 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.apihub.v1.DeploymentMetadata)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DeploymentMetadata other = + (com.google.cloud.apihub.v1.DeploymentMetadata) obj; + + if (hasDeployment() != other.hasDeployment()) return false; + if (hasDeployment()) { + if (!getDeployment().equals(other.getDeployment())) return false; + } + if (!getOriginalId().equals(other.getOriginalId())) return false; + if (hasOriginalCreateTime() != other.hasOriginalCreateTime()) return false; + if (hasOriginalCreateTime()) { + if (!getOriginalCreateTime().equals(other.getOriginalCreateTime())) return false; + } + if (hasOriginalUpdateTime() != other.hasOriginalUpdateTime()) return false; + if (hasOriginalUpdateTime()) { + if (!getOriginalUpdateTime().equals(other.getOriginalUpdateTime())) 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 (hasDeployment()) { + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + } + hash = (37 * hash) + ORIGINAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getOriginalId().hashCode(); + if (hasOriginalCreateTime()) { + hash = (37 * hash) + ORIGINAL_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOriginalCreateTime().hashCode(); + } + if (hasOriginalUpdateTime()) { + hash = (37 * hash) + ORIGINAL_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOriginalUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata 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.apihub.v1.DeploymentMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom( + 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.apihub.v1.DeploymentMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom( + java.io.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.apihub.v1.DeploymentMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseDelimitedFrom( + java.io.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.apihub.v1.DeploymentMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DeploymentMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The metadata associated with a deployment.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DeploymentMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DeploymentMetadata) + com.google.cloud.apihub.v1.DeploymentMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_DeploymentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DeploymentMetadata.class, + com.google.cloud.apihub.v1.DeploymentMetadata.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DeploymentMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeploymentFieldBuilder(); + getOriginalCreateTimeFieldBuilder(); + getOriginalUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + originalId_ = ""; + originalCreateTime_ = null; + if (originalCreateTimeBuilder_ != null) { + originalCreateTimeBuilder_.dispose(); + originalCreateTimeBuilder_ = null; + } + originalUpdateTime_ = null; + if (originalUpdateTimeBuilder_ != null) { + originalUpdateTimeBuilder_.dispose(); + originalUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.CollectServiceProto + .internal_static_google_cloud_apihub_v1_DeploymentMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeploymentMetadata getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DeploymentMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeploymentMetadata build() { + com.google.cloud.apihub.v1.DeploymentMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DeploymentMetadata buildPartial() { + com.google.cloud.apihub.v1.DeploymentMetadata result = + new com.google.cloud.apihub.v1.DeploymentMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.apihub.v1.DeploymentMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deployment_ = deploymentBuilder_ == null ? deployment_ : deploymentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.originalId_ = originalId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.originalCreateTime_ = + originalCreateTimeBuilder_ == null + ? originalCreateTime_ + : originalCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.originalUpdateTime_ = + originalUpdateTimeBuilder_ == null + ? originalUpdateTime_ + : originalUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DeploymentMetadata) { + return mergeFrom((com.google.cloud.apihub.v1.DeploymentMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DeploymentMetadata other) { + if (other == com.google.cloud.apihub.v1.DeploymentMetadata.getDefaultInstance()) return this; + if (other.hasDeployment()) { + mergeDeployment(other.getDeployment()); + } + if (!other.getOriginalId().isEmpty()) { + originalId_ = other.originalId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOriginalCreateTime()) { + mergeOriginalCreateTime(other.getOriginalCreateTime()); + } + if (other.hasOriginalUpdateTime()) { + mergeOriginalUpdateTime(other.getOriginalUpdateTime()); + } + 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(getDeploymentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + originalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getOriginalCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getOriginalUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.apihub.v1.Deployment deployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Deployment, + com.google.cloud.apihub.v1.Deployment.Builder, + com.google.cloud.apihub.v1.DeploymentOrBuilder> + deploymentBuilder_; + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + public boolean hasDeployment() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + public com.google.cloud.apihub.v1.Deployment getDeployment() { + if (deploymentBuilder_ == null) { + return deployment_ == null + ? com.google.cloud.apihub.v1.Deployment.getDefaultInstance() + : deployment_; + } else { + return deploymentBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.apihub.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployment_ = value; + } else { + deploymentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.apihub.v1.Deployment.Builder builderForValue) { + if (deploymentBuilder_ == null) { + deployment_ = builderForValue.build(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeployment(com.google.cloud.apihub.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && deployment_ != null + && deployment_ != com.google.cloud.apihub.v1.Deployment.getDefaultInstance()) { + getDeploymentBuilder().mergeFrom(value); + } else { + deployment_ = value; + } + } else { + deploymentBuilder_.mergeFrom(value); + } + if (deployment_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeployment() { + bitField0_ = (bitField0_ & ~0x00000001); + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.Deployment.Builder getDeploymentBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDeploymentFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + if (deploymentBuilder_ != null) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + return deployment_ == null + ? com.google.cloud.apihub.v1.Deployment.getDefaultInstance() + : deployment_; + } + } + + /** + * + * + *
    +     * Required. The deployment resource to be pushed to Hub's collect layer. The
    +     * ID of the deployment will be generated by Hub.
    +     * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Deployment, + com.google.cloud.apihub.v1.Deployment.Builder, + com.google.cloud.apihub.v1.DeploymentOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + deploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.apihub.v1.Deployment, + com.google.cloud.apihub.v1.Deployment.Builder, + com.google.cloud.apihub.v1.DeploymentOrBuilder>( + getDeployment(), getParentForChildren(), isClean()); + deployment_ = null; + } + return deploymentBuilder_; + } + + private java.lang.Object originalId_ = ""; + + /** + * + * + *
    +     * Optional. The unique identifier of the deployment in the system where it
    +     * was originally created.
    +     * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + public java.lang.String getOriginalId() { + java.lang.Object ref = originalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique identifier of the deployment in the system where it
    +     * was originally created.
    +     * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + public com.google.protobuf.ByteString getOriginalIdBytes() { + java.lang.Object ref = originalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique identifier of the deployment in the system where it
    +     * was originally created.
    +     * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The originalId to set. + * @return This builder for chaining. + */ + public Builder setOriginalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + originalId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique identifier of the deployment in the system where it
    +     * was originally created.
    +     * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOriginalId() { + originalId_ = getDefaultInstance().getOriginalId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique identifier of the deployment in the system where it
    +     * was originally created.
    +     * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for originalId to set. + * @return This builder for chaining. + */ + public Builder setOriginalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + originalId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp originalCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + originalCreateTimeBuilder_; + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + public boolean hasOriginalCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + public com.google.protobuf.Timestamp getOriginalCreateTime() { + if (originalCreateTimeBuilder_ == null) { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } else { + return originalCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOriginalCreateTime(com.google.protobuf.Timestamp value) { + if (originalCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalCreateTime_ = value; + } else { + originalCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOriginalCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (originalCreateTimeBuilder_ == null) { + originalCreateTime_ = builderForValue.build(); + } else { + originalCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOriginalCreateTime(com.google.protobuf.Timestamp value) { + if (originalCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && originalCreateTime_ != null + && originalCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOriginalCreateTimeBuilder().mergeFrom(value); + } else { + originalCreateTime_ = value; + } + } else { + originalCreateTimeBuilder_.mergeFrom(value); + } + if (originalCreateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOriginalCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + originalCreateTime_ = null; + if (originalCreateTimeBuilder_ != null) { + originalCreateTimeBuilder_.dispose(); + originalCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getOriginalCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOriginalCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder() { + if (originalCreateTimeBuilder_ != null) { + return originalCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return originalCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalCreateTime_; + } + } + + /** + * + * + *
    +     * Optional. Timestamp indicating when the deployment was created at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOriginalCreateTimeFieldBuilder() { + if (originalCreateTimeBuilder_ == null) { + originalCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOriginalCreateTime(), getParentForChildren(), isClean()); + originalCreateTime_ = null; + } + return originalCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp originalUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + originalUpdateTimeBuilder_; + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + public boolean hasOriginalUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + public com.google.protobuf.Timestamp getOriginalUpdateTime() { + if (originalUpdateTimeBuilder_ == null) { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } else { + return originalUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOriginalUpdateTime(com.google.protobuf.Timestamp value) { + if (originalUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalUpdateTime_ = value; + } else { + originalUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOriginalUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (originalUpdateTimeBuilder_ == null) { + originalUpdateTime_ = builderForValue.build(); + } else { + originalUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOriginalUpdateTime(com.google.protobuf.Timestamp value) { + if (originalUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && originalUpdateTime_ != null + && originalUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOriginalUpdateTimeBuilder().mergeFrom(value); + } else { + originalUpdateTime_ = value; + } + } else { + originalUpdateTimeBuilder_.mergeFrom(value); + } + if (originalUpdateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOriginalUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + originalUpdateTime_ = null; + if (originalUpdateTimeBuilder_ != null) { + originalUpdateTimeBuilder_.dispose(); + originalUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getOriginalUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOriginalUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder() { + if (originalUpdateTimeBuilder_ != null) { + return originalUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return originalUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : originalUpdateTime_; + } + } + + /** + * + * + *
    +     * Required. Timestamp indicating when the deployment was last updated at the
    +     * source.
    +     * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOriginalUpdateTimeFieldBuilder() { + if (originalUpdateTimeBuilder_ == null) { + originalUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOriginalUpdateTime(), getParentForChildren(), isClean()); + originalUpdateTime_ = null; + } + return originalUpdateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.apihub.v1.DeploymentMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DeploymentMetadata) + private static final com.google.cloud.apihub.v1.DeploymentMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DeploymentMetadata(); + } + + public static com.google.cloud.apihub.v1.DeploymentMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentMetadata 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.apihub.v1.DeploymentMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadataOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadataOrBuilder.java new file mode 100644 index 000000000000..7cb8fe7af0b0 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentMetadataOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/collect_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DeploymentMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DeploymentMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + com.google.cloud.apihub.v1.Deployment getDeployment(); + + /** + * + * + *
    +   * Required. The deployment resource to be pushed to Hub's collect layer. The
    +   * ID of the deployment will be generated by Hub.
    +   * 
    + * + * + * .google.cloud.apihub.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.apihub.v1.DeploymentOrBuilder getDeploymentOrBuilder(); + + /** + * + * + *
    +   * Optional. The unique identifier of the deployment in the system where it
    +   * was originally created.
    +   * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The originalId. + */ + java.lang.String getOriginalId(); + + /** + * + * + *
    +   * Optional. The unique identifier of the deployment in the system where it
    +   * was originally created.
    +   * 
    + * + * string original_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for originalId. + */ + com.google.protobuf.ByteString getOriginalIdBytes(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the originalCreateTime field is set. + */ + boolean hasOriginalCreateTime(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The originalCreateTime. + */ + com.google.protobuf.Timestamp getOriginalCreateTime(); + + /** + * + * + *
    +   * Optional. Timestamp indicating when the deployment was created at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_create_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getOriginalCreateTimeOrBuilder(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the originalUpdateTime field is set. + */ + boolean hasOriginalUpdateTime(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The originalUpdateTime. + */ + com.google.protobuf.Timestamp getOriginalUpdateTime(); + + /** + * + * + *
    +   * Required. Timestamp indicating when the deployment was last updated at the
    +   * source.
    +   * 
    + * + * + * .google.protobuf.Timestamp original_update_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getOriginalUpdateTimeOrBuilder(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentOrBuilder.java index f91a5ad816fd..6bd926e7748b 100644 --- a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentOrBuilder.java +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DeploymentOrBuilder.java @@ -219,9 +219,12 @@ public interface DeploymentOrBuilder * * *
    -   * Required. A URI to the runtime resource. This URI can be used to manage the
    -   * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -   * then this field will contain the URI to the management UI of the proxy.
    +   * Required. The resource URI identifies the deployment within its gateway.
    +   * For Apigee gateways, its recommended to use the format:
    +   * organizations/{org}/environments/{env}/apis/{api}.
    +   * For ex: if a proxy with name `orders` is deployed in `staging`
    +   * environment of `cymbal` organization, the resource URI would be:
    +   * `organizations/cymbal/environments/staging/apis/orders`.
        * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -234,9 +237,12 @@ public interface DeploymentOrBuilder * * *
    -   * Required. A URI to the runtime resource. This URI can be used to manage the
    -   * resource. For example, if the runtime resource is of type APIGEE_PROXY,
    -   * then this field will contain the URI to the management UI of the proxy.
    +   * Required. The resource URI identifies the deployment within its gateway.
    +   * For Apigee gateways, its recommended to use the format:
    +   * organizations/{org}/environments/{env}/apis/{api}.
    +   * For ex: if a proxy with name `orders` is deployed in `staging`
    +   * environment of `cymbal` organization, the resource URI would be:
    +   * `organizations/cymbal/environments/staging/apis/orders`.
        * 
    * * string resource_uri = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -664,4 +670,258 @@ com.google.cloud.apihub.v1.AttributeValues getAttributesOrDefault( *
    */ com.google.cloud.apihub.v1.AttributeValues getAttributesOrThrow(java.lang.String key); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSourceMetadataList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadata getSourceMetadata(int index); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSourceMetadataCount(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSourceMetadataOrBuilderList(); + + /** + * + * + *
    +   * Output only. The list of sources and metadata from the sources of the
    +   * deployment.
    +   * 
    + * + * + * repeated .google.cloud.apihub.v1.SourceMetadata source_metadata = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.apihub.v1.SourceMetadataOrBuilder getSourceMetadataOrBuilder(int index); + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the managementUrl field is set. + */ + boolean hasManagementUrl(); + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The managementUrl. + */ + com.google.cloud.apihub.v1.AttributeValues getManagementUrl(); + + /** + * + * + *
    +   * Optional. The uri where users can navigate to for the management of the
    +   * deployment. This maps to the following system defined attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-management-url`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URL.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues management_url = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.AttributeValuesOrBuilder getManagementUrlOrBuilder(); + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sourceUri field is set. + */ + boolean hasSourceUri(); + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sourceUri. + */ + com.google.cloud.apihub.v1.AttributeValues getSourceUri(); + + /** + * + * + *
    +   * Optional. The uri where additional source specific information for this
    +   * deployment can be found. This maps to the following system defined
    +   * attribute:
    +   * `projects/{project}/locations/{location}/attributes/system-source-uri`
    +   * The number of values for this attribute will be based on the
    +   * cardinality of the attribute. The same can be retrieved via GetAttribute
    +   * API. The value of the attribute should be a valid URI, and in case
    +   * of Cloud Storage URI, it should point to a Cloud Storage object,
    +   * not a directory.
    +   * 
    + * + * + * .google.cloud.apihub.v1.AttributeValues source_uri = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.apihub.v1.AttributeValuesOrBuilder getSourceUriOrBuilder(); + + /** + * + * + *
    +   * Optional. The project to which the deployment belongs.
    +   * For GCP gateways, this will refer to the project identifier.
    +   * For others like Edge/OPDK, this will refer to the org identifier.
    +   * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceProject. + */ + java.lang.String getSourceProject(); + + /** + * + * + *
    +   * Optional. The project to which the deployment belongs.
    +   * For GCP gateways, this will refer to the project identifier.
    +   * For others like Edge/OPDK, this will refer to the org identifier.
    +   * 
    + * + * string source_project = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceProject. + */ + com.google.protobuf.ByteString getSourceProjectBytes(); + + /** + * + * + *
    +   * Optional. The environment at source for the deployment.
    +   * For example: prod, dev, staging, etc.
    +   * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sourceEnvironment. + */ + java.lang.String getSourceEnvironment(); + + /** + * + * + *
    +   * Optional. The environment at source for the deployment.
    +   * For example: prod, dev, staging, etc.
    +   * 
    + * + * string source_environment = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sourceEnvironment. + */ + com.google.protobuf.ByteString getSourceEnvironmentBytes(); } diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequest.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequest.java new file mode 100644 index 000000000000..d2d37fe83139 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequest.java @@ -0,0 +1,861 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The
    + * [DisablePluginInstanceAction][google.cloud.apihub.v1.ApiHubPlugin.DisablePluginInstanceAction]
    + * method's request.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DisablePluginInstanceActionRequest} + */ +public final class DisablePluginInstanceActionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DisablePluginInstanceActionRequest) + DisablePluginInstanceActionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DisablePluginInstanceActionRequest.newBuilder() to construct. + private DisablePluginInstanceActionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisablePluginInstanceActionRequest() { + name_ = ""; + actionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisablePluginInstanceActionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.class, + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
    +   * Required. The name of the plugin instance to disable.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The name of the plugin instance to disable.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object actionId_ = ""; + + /** + * + * + *
    +   * Required. The action id to disable.
    +   * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + @java.lang.Override + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The action id to disable.
    +   * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = 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(actionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, actionId_); + } + 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(actionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, actionId_); + } + 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.apihub.v1.DisablePluginInstanceActionRequest)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest other = + (com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getActionId().equals(other.getActionId())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest 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.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + 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.apihub.v1.DisablePluginInstanceActionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + java.io.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.apihub.v1.DisablePluginInstanceActionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseDelimitedFrom( + java.io.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.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DisablePluginInstanceActionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The
    +   * [DisablePluginInstanceAction][google.cloud.apihub.v1.ApiHubPlugin.DisablePluginInstanceAction]
    +   * method's request.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DisablePluginInstanceActionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DisablePluginInstanceActionRequest) + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.class, + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + actionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest build() { + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest buildPartial() { + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest result = + new com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionId_ = actionId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.apihub.v1.DisablePluginInstanceActionRequest) { + return mergeFrom((com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest other) { + if (other + == com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getActionId().isEmpty()) { + actionId_ = other.actionId_; + bitField0_ |= 0x00000002; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + actionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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.lang.Object name_ = ""; + + /** + * + * + *
    +     * Required. The name of the plugin instance to disable.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to disable.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to disable.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to disable.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The name of the plugin instance to disable.
    +     * Format:
    +     * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +     * 
    + * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object actionId_ = ""; + + /** + * + * + *
    +     * Required. The action id to disable.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + public java.lang.String getActionId() { + java.lang.Object ref = actionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The action id to disable.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + public com.google.protobuf.ByteString getActionIdBytes() { + java.lang.Object ref = actionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The action id to disable.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action id to disable.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + actionId_ = getDefaultInstance().getActionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The action id to disable.
    +     * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for actionId to set. + * @return This builder for chaining. + */ + public Builder setActionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionId_ = value; + bitField0_ |= 0x00000002; + 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.apihub.v1.DisablePluginInstanceActionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DisablePluginInstanceActionRequest) + private static final com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest(); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisablePluginInstanceActionRequest 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.apihub.v1.DisablePluginInstanceActionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequestOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequestOrBuilder.java new file mode 100644 index 000000000000..5571e855a38c --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DisablePluginInstanceActionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DisablePluginInstanceActionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the plugin instance to disable.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
    +   * Required. The name of the plugin instance to disable.
    +   * Format:
    +   * `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. The action id to disable.
    +   * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The actionId. + */ + java.lang.String getActionId(); + + /** + * + * + *
    +   * Required. The action id to disable.
    +   * 
    + * + * string action_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for actionId. + */ + com.google.protobuf.ByteString getActionIdBytes(); +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponse.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponse.java new file mode 100644 index 000000000000..bb773d111a6c --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponse.java @@ -0,0 +1,446 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * The
    + * [DisablePluginInstanceAction][google.cloud.apihub.v1.ApiHubPlugin.DisablePluginInstanceAction]
    + * method's response.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DisablePluginInstanceActionResponse} + */ +public final class DisablePluginInstanceActionResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DisablePluginInstanceActionResponse) + DisablePluginInstanceActionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DisablePluginInstanceActionResponse.newBuilder() to construct. + private DisablePluginInstanceActionResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisablePluginInstanceActionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisablePluginInstanceActionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.class, + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.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.apihub.v1.DisablePluginInstanceActionResponse)) { + return super.equals(obj); + } + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse other = + (com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse) 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.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse 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.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + 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.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + java.io.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.apihub.v1.DisablePluginInstanceActionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseDelimitedFrom( + java.io.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.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.apihub.v1.DisablePluginInstanceActionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
    +   * The
    +   * [DisablePluginInstanceAction][google.cloud.apihub.v1.ApiHubPlugin.DisablePluginInstanceAction]
    +   * method's response.
    +   * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DisablePluginInstanceActionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.apihub.v1.DisablePluginInstanceActionResponse) + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.class, + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.Builder.class); + } + + // Construct using com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.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.apihub.v1.PluginServiceProto + .internal_static_google_cloud_apihub_v1_DisablePluginInstanceActionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse + getDefaultInstanceForType() { + return com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse build() { + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse buildPartial() { + com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse result = + new com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse(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.apihub.v1.DisablePluginInstanceActionResponse) { + return mergeFrom((com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse other) { + if (other + == com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse.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.apihub.v1.DisablePluginInstanceActionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.apihub.v1.DisablePluginInstanceActionResponse) + private static final com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse(); + } + + public static com.google.cloud.apihub.v1.DisablePluginInstanceActionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisablePluginInstanceActionResponse 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.apihub.v1.DisablePluginInstanceActionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponseOrBuilder.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponseOrBuilder.java new file mode 100644 index 000000000000..f3d388362835 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DisablePluginInstanceActionResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/plugin_service.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +public interface DisablePluginInstanceActionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.apihub.v1.DisablePluginInstanceActionResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservation.java b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservation.java new file mode 100644 index 000000000000..243ce4452b36 --- /dev/null +++ b/java-apihub/proto-google-cloud-apihub-v1/src/main/java/com/google/cloud/apihub/v1/DiscoveredApiObservation.java @@ -0,0 +1,4166 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/apihub/v1/common_fields.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.apihub.v1; + +/** + * + * + *
    + * Respresents an API Observation observed in one of the sources.
    + * 
    + * + * Protobuf type {@code google.cloud.apihub.v1.DiscoveredApiObservation} + */ +public final class DiscoveredApiObservation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.apihub.v1.DiscoveredApiObservation) + DiscoveredApiObservationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DiscoveredApiObservation.newBuilder() to construct. + private DiscoveredApiObservation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiscoveredApiObservation() { + name_ = ""; + style_ = 0; + serverIps_ = com.google.protobuf.LazyStringArrayList.emptyList(); + hostname_ = ""; + sourceLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + origin_ = ""; + sourceTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiscoveredApiObservation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.apihub.v1.CommonFieldsProto + .internal_static_google_cloud_apihub_v1_DiscoveredApiObservation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.apihub.v1.DiscoveredApiObservation.class, + com.google.cloud.apihub.v1.DiscoveredApiObservation.Builder.class); + } + + /** + * + * + *
    +   * DiscoveredApiObservation protocol style
    +   * 
    + * + * Protobuf enum {@code google.cloud.apihub.v1.DiscoveredApiObservation.Style} + */ + public enum Style implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unknown style
    +     * 
    + * + * STYLE_UNSPECIFIED = 0; + */ + STYLE_UNSPECIFIED(0), + /** + * + * + *
    +     * Style is Rest API
    +     * 
    + * + * REST = 1; + */ + REST(1), + /** + * + * + *
    +     * Style is Grpc API
    +     * 
    + * + * GRPC = 2; + */ + GRPC(2), + /** + * + * + *
    +     * Style is GraphQL API
    +     * 
    + * + * GRAPHQL = 3; + */ + GRAPHQL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unknown style
    +     * 
    + * + * STYLE_UNSPECIFIED = 0; + */ + public static final int STYLE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * Style is Rest API
    +     * 
    + * + * REST = 1; + */ + public static final int REST_VALUE = 1; + + /** + * + * + *
    +     * Style is Grpc API
    +     * 
    + * + * GRPC = 2; + */ + public static final int GRPC_VALUE = 2; + + /** + * + * + *
    +     * Style is GraphQL API
    +     * 
    + * + * GRAPHQL = 3; + */ + public static final int GRAPHQL_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Style 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 Style forNumber(int value) { + switch (value) { + case 0: + return STYLE_UNSPECIFIED; + case 1: + return REST; + case 2: + return GRPC; + case 3: + return GRAPHQL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap